Skip to main content

Interface: ViewState

Defined in: spec/types.ts:88

Properties​

bearing?​

optional bearing?: number

Defined in: spec/types.ts:106


center?​

optional center?: LngLat

Defined in: spec/types.ts:89


maxZoomIn?​

optional maxZoomIn?: number

Defined in: spec/types.ts:97

Highest zoom level the user can reach by zooming in. Acts as a camera ceiling: interactive zoom, setView, and programmatic zoom are all clamped to this value. Higher numbers mean closer to the ground. When omitted, MapLibre's default maximum (22) applies.


maxZoomOut?​

optional maxZoomOut?: number

Defined in: spec/types.ts:104

Lowest zoom level the user can reach by zooming out. Acts as a camera floor: interactive zoom, setView, and programmatic zoom are all clamped to this value. Lower numbers mean farther from the ground. When omitted, MapLibre's default minimum (0) applies.


pitch?​

optional pitch?: number

Defined in: spec/types.ts:105


projection?​

optional projection?: "mercator" | "vertical-perspective"

Defined in: spec/types.ts:107


zoom?​

optional zoom?: number

Defined in: spec/types.ts:90