Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docsprint] Add inline and related example for panTo #9547

Merged
merged 1 commit into from
Apr 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/ui/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,21 @@ class Camera extends Evented {
}

/**
* Pans the map to the specified location, with an animated transition.
* Pans the map to the specified location with an animated transition.
*
* @memberof Map#
* @param lnglat The location to pan the map to.
* @param options Options object
* @param options Options describing the destination and animation of the transition.
* @param eventData Additional properties to be added to event objects of events triggered by this method.
* @fires movestart
* @fires moveend
* @returns {Map} `this`
* @example
* map.panTo([-74, 38]);
* @example
* // Change the duration of panTo to 5000 milliseconds.
* map.panTo([-74, 38], {duration: 5000});
* @see [Update a feature in realtime](https://docs.mapbox.com/mapbox-gl-js/example/live-update-feature/)
*/
panTo(lnglat: LngLatLike, options?: AnimationOptions, eventData?: Object) {
return this.easeTo(extend({
Expand Down