Skip to content

Commit

Permalink
[docsprint] Add inline snippet and examples to map.jumpTo (#9549)
Browse files Browse the repository at this point in the history
* add inline snippet and examples to map.jumpTo

* minor reorder to match options and text
  • Loading branch information
jstratman authored Apr 20, 2020
1 parent 4ed7ca8 commit 254f29f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ui/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,19 @@ class Camera extends Evented {
* @fires zoomend
* @fires pitchend
* @returns {Map} `this`
* @example
* // jump to null island at current zoom
* map.jumpTo({center: [0, 0]});
* // jump with zoom, pitch, and bearing set
* map.jumpTo({
* center: [0, 0],
* zoom: 8,
* pitch: 45,
* bearing: 90
* }
* });
* @see [Jump to a series of locations](https://docs.mapbox.com/mapbox-gl-js/example/jump-to/)
* @see [Update a feature in realtime](https://docs.mapbox.com/mapbox-gl-js/example/live-update-feature/)
*/
jumpTo(options: CameraOptions, eventData?: Object) {
this.stop();
Expand Down

0 comments on commit 254f29f

Please sign in to comment.