From 254f29f4410508b00c5efd866c450af47b2603e0 Mon Sep 17 00:00:00 2001 From: Jeremy Stratman Date: Mon, 20 Apr 2020 14:47:12 -0700 Subject: [PATCH] [docsprint] Add inline snippet and examples to map.jumpTo (#9549) * add inline snippet and examples to map.jumpTo * minor reorder to match options and text --- src/ui/camera.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/ui/camera.js b/src/ui/camera.js index a02c8bace9f..caf116baee6 100644 --- a/src/ui/camera.js +++ b/src/ui/camera.js @@ -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();