CameraOptions interface

The options for setting the map control's camera.

Extends

Properties

bearing

The bearing of the map (rotation) in degrees. When the bearing is 0, 90, 180, or 270 the top of the map container will be north, east, south or west respectively. default 0

center

The position to align the center of the map view with. default [0, 0]

centerOffset

A pixel offset to apply to the center of the map. This is useful if you want to programmatically pan the map to another location or if you want to center the map over a shape, then offset the maps view to make room for a popup. Default [0, 0].

maxBounds

A bounding box in which to constrain the viewable map area to. Users won't be able to pan the center of the map outside of this bounding box. Set maxBounds to null or undefined to remove maxBounds Default undefined.

maxPitch

The maximum pitch that the map can be pitched to during the animation. Must be between 0 and 85, and greater than or equal to minPitch Default 60.

maxZoom

The maximum zoom level that the map can be zoomed into during the animation. Must be between 0 and 24, and greater than or equal to minZoom. default 20

minPitch

The minimum pitch that the map can be pitched to during the animation. Must be between 0 and 85, and less than or equal to maxPitch. Default 0.

minZoom

The minimum zoom level that the map can be zoomed out to during the animation. Must be between 0 and 24, and less than or equal to maxZoom. Setting minZoom below 1 may result in an empty map when the zoom level is less than 1. default 1

pitch

The pitch (tilt) of the map in degrees between 0 and 60, where 0 is looking straight down on the map. default 0

zoom

The zoom level of the map view. default 1

Property Details

bearing

The bearing of the map (rotation) in degrees. When the bearing is 0, 90, 180, or 270 the top of the map container will be north, east, south or west respectively. default 0

bearing?: number

Property Value

number

center

The position to align the center of the map view with. default [0, 0]

center?: Position

Property Value

centerOffset

A pixel offset to apply to the center of the map. This is useful if you want to programmatically pan the map to another location or if you want to center the map over a shape, then offset the maps view to make room for a popup. Default [0, 0].

centerOffset?: Pixel

Property Value

maxBounds

A bounding box in which to constrain the viewable map area to. Users won't be able to pan the center of the map outside of this bounding box. Set maxBounds to null or undefined to remove maxBounds Default undefined.

maxBounds?: BoundingBox

Property Value

maxPitch

The maximum pitch that the map can be pitched to during the animation. Must be between 0 and 85, and greater than or equal to minPitch Default 60.

maxPitch?: number

Property Value

number

maxZoom

The maximum zoom level that the map can be zoomed into during the animation. Must be between 0 and 24, and greater than or equal to minZoom. default 20

maxZoom?: number

Property Value

number

minPitch

The minimum pitch that the map can be pitched to during the animation. Must be between 0 and 85, and less than or equal to maxPitch. Default 0.

minPitch?: number

Property Value

number

minZoom

The minimum zoom level that the map can be zoomed out to during the animation. Must be between 0 and 24, and less than or equal to maxZoom. Setting minZoom below 1 may result in an empty map when the zoom level is less than 1. default 1

minZoom?: number

Property Value

number

pitch

The pitch (tilt) of the map in degrees between 0 and 60, where 0 is looking straight down on the map. default 0

pitch?: number

Property Value

number

zoom

The zoom level of the map view. default 1

zoom?: number

Property Value

number