lonboard.view_state¶
lonboard.view_state ¶
BaseViewState ¶
Base class for view states.
MapViewState
dataclass
¶
Bases: BaseViewState
State of a MapView.
GlobeViewState
dataclass
¶
FirstPersonViewState
dataclass
¶
Bases: BaseViewState
State of a FirstPersonView.
position
class-attribute
instance-attribute
¶
Meter offsets of the camera from the lng-lat anchor point.
bearing
class-attribute
instance-attribute
¶
bearing: float = 0.0
bearing angle in degrees. 0 is north.
pitch
class-attribute
instance-attribute
¶
pitch: float = 0.0
pitch angle in degrees. 0 is horizontal.
OrthographicViewState
dataclass
¶
Bases: BaseViewState
State of an OrthographicView.
target
class-attribute
instance-attribute
¶
The world position at the center of the viewport.
zoom
class-attribute
instance-attribute
¶
The zoom level of the viewport.
zoom: 0maps one unit distance to one pixel on screen, and increasingzoomby1scales the same object to twice as large. For examplezoom: 1is 2x the original size,zoom: 2is 4x,zoom: 3is 8x etc.
To apply independent zoom levels to the X and Y axes, supply a tuple [zoomX, zoomY].
Default 0.
OrbitViewState
dataclass
¶
Bases: BaseViewState
State of an OrbitView.
target
class-attribute
instance-attribute
¶
The world position at the center of the viewport.
rotation_orbit
class-attribute
instance-attribute
¶
rotation_orbit: float = 0.0
Rotating angle around orbit axis. Default 0.
rotation_x
class-attribute
instance-attribute
¶
rotation_x: float = 0.0
Rotating angle around X axis. Default 0.
zoom
class-attribute
instance-attribute
¶
zoom: float = 0.0
The zoom level of the viewport.
zoom: 0 maps one unit distance to one pixel on screen, and increasing zoom by
1 scales the same object to twice as large.
Default 0.
min_zoom
class-attribute
instance-attribute
¶
min_zoom: float | None = None
The min zoom level of the viewport. Default -Infinity.
max_zoom
class-attribute
instance-attribute
¶
max_zoom: float | None = None
The max zoom level of the viewport. Default Infinity.