Skip to content

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

Defined in

src/ui/camera.ts:56

facebook
Tổng đài hỗ trợ
089.616.4567
facebook Chat Facebook zalo Chat Zalo