Type alias: CameraOptions¶
Ƭ CameraOptions: CenterZoomBearing
& { around?
: LngLatLike
; pitch?
: number
}
Options common to Map#jumpTo, Map#easeTo, and Map#flyTo, controlling the desired location, zoom, bearing, and pitch of the camera. All properties are optional, and when a property is omitted, the current camera value for that property will remain unchanged.
Example
Set the map's initial perspective with CameraOptions
let map = new Map({
container: 'map',
style: 'https://maps.vietmap.vn/mt/tm/style.json?apikey={your-apikey}',
center: [-73.5804, 45.53483],
pitch: 60,
bearing: -60,
zoom: 10
});
See
- [Set pitch and bearing]
- Jump to a series of locations
- Fly to a location
- [Display buildings in 3D]
Defined in¶
src/ui/camera.ts:56