CameraBoundsOptions interface

The options for setting the bounds of the map control's camera.

Extends

Properties

bounds

The bounds of the map control's camera. default [-180, -89, 180, 90]

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.

maxZoom

The maximum zoom level to allow when the map view transitions to the specified bounds. default 20

offset

An offset of the center of the given bounds relative to the map's center, measured in pixels. default [0, 0]

padding

The amount of padding in pixels to add to the given bounds. default {top: 0, bottom: 0, left: 0, right: 0}

Property Details

bounds

The bounds of the map control's camera. default [-180, -89, 180, 90]

bounds?: BoundingBox

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

maxZoom

The maximum zoom level to allow when the map view transitions to the specified bounds. default 20

maxZoom?: number

Property Value

number

offset

An offset of the center of the given bounds relative to the map's center, measured in pixels. default [0, 0]

offset?: Pixel

Property Value

padding

The amount of padding in pixels to add to the given bounds. default {top: 0, bottom: 0, left: 0, right: 0}

padding?: Padding | number

Property Value

Padding | number