Interface: ViewState
Defined in: spec/types.ts:88
Properties
bearing?
optionalbearing?:number
Defined in: spec/types.ts:106
cameraAngleTransitionMs?
optionalcameraAngleTransitionMs?:number
Defined in: spec/types.ts:114
Eases the camera, over this many milliseconds, when pitch or bearing
changes from one spec to the next — tilting into a 3D view rather than
snapping to it. Omit it (or 0) to jump, as before. Centre and zoom
changes still jump. A viewer's reduced-motion setting turns the ease into a
jump.
center?
optionalcenter?:LngLat
Defined in: spec/types.ts:89
maxZoomIn?
optionalmaxZoomIn?: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?
optionalmaxZoomOut?: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?
optionalpitch?:number
Defined in: spec/types.ts:105
projection?
optionalprojection?:"mercator"|"vertical-perspective"
Defined in: spec/types.ts:115
zoom?
optionalzoom?:number
Defined in: spec/types.ts:90