Skip to content

Both copy text to your clipboard — Build with AI copies a setup prompt to paste into Claude Code, Cursor, Codex or Copilot; Copy page as Markdown copies this page to paste into a chat. How it works

CameraForBoundsOptions ​

CameraForBoundsOptions = CameraOptions & object

Defined in: src/ui/camera.ts:104

A options object for the Map#cameraForBounds method

Type declaration ​

maxZoom? ​

optional maxZoom: number

The maximum zoom level to allow when the camera would transition to the specified bounds.

offset? ​

optional offset: PointLike

The center of the given bounds relative to the map's center, measured in pixels.

Default Value ​

ts
[0, 0]

padding? ​

optional padding: number | PaddingOptions

The amount of padding in pixels to add to the given bounds.