Skip to content

lonboard.experimental.view

lonboard.experimental.view

BaseView

Bases: BaseWidget

A deck.gl View.

The BaseView class and its subclasses are used to specify where and how your deck.gl layers should be rendered. Applications typically instantiate at least one BaseView subclass.

x class-attribute instance-attribute

x = tag(sync=True)

The x position of the view.

A relative (e.g. '50%') or absolute position. Default 0.

y class-attribute instance-attribute

y = tag(sync=True)

The y position of the view.

A relative (e.g. '50%') or absolute position. Default 0.

width class-attribute instance-attribute

width = tag(sync=True)

The width of the view.

A relative (e.g. '50%') or absolute extent. Default '100%'.

height class-attribute instance-attribute

height = tag(sync=True)

The height of the view.

A relative (e.g. '50%') or absolute extent. Default '100%'.

MapView

Bases: BaseView

A deck.gl MapView.

The MapView creates a camera that looks at a geospatial location on a map from a certain direction. The behavior of MapView is generally modeled after that of Mapbox GL JS.

Most geospatial applications will use this view with the default parameters.

repeat class-attribute instance-attribute

repeat = tag(sync=True)

Whether to render multiple copies of the map at low zoom levels. Default false.

near_z_multiplier class-attribute instance-attribute

near_z_multiplier = tag(sync=True)

Scaler for the near plane, 1 unit equals to the height of the viewport.

Default to 0.1. Overwrites the near parameter.

far_z_multiplier class-attribute instance-attribute

far_z_multiplier = tag(sync=True)

Scaler for the far plane, 1 unit equals to the distance from the camera to the top edge of the screen.

Default to 1.01. Overwrites the far parameter.

projection_matrix class-attribute instance-attribute

projection_matrix = tag(sync=True)

Projection matrix.

If projectionMatrix is not supplied, the View class will build a projection matrix from the following parameters:

fovy class-attribute instance-attribute

fovy = tag(sync=True)

Field of view covered by camera, in the perspective case. In degrees.

If not supplied, will be calculated from altitude.

altitude class-attribute instance-attribute

altitude = tag(sync=True)

Distance of the camera relative to viewport height.

Default 1.5.

orthographic class-attribute instance-attribute

orthographic = tag(sync=True)

Whether to create an orthographic or perspective projection matrix.

Default is false (perspective projection).

GlobeView

Bases: BaseView

A deck.gl GlobeView.

The GlobeView projects the earth into a 3D globe.

resolution class-attribute instance-attribute

resolution = tag(sync=True)

The resolution at which to turn flat features into 3D meshes, in degrees.

Smaller numbers will generate more detailed mesh. Default 10.

near_z_multiplier class-attribute instance-attribute

near_z_multiplier = tag(sync=True)

Scaler for the near plane, 1 unit equals to the height of the viewport.

Default to 0.1. Overwrites the near parameter.

far_z_multiplier class-attribute instance-attribute

far_z_multiplier = tag(sync=True)

Scaler for the far plane, 1 unit equals to the distance from the camera to the top edge of the screen.

Default to 2. Overwrites the far parameter.

FirstPersonView

Bases: BaseView

A deck.gl FirstPersonView.

The FirstPersonView class is a subclass of View that describes a camera placed at a provided location, looking towards the direction and orientation specified by viewState. The behavior is similar to that of a first-person game.

projection_matrix class-attribute instance-attribute

projection_matrix = tag(sync=True)

Projection matrix.

If projectionMatrix is not supplied, the View class will build a projection matrix from the following parameters:

fovy class-attribute instance-attribute

fovy = tag(sync=True)

Field of view covered by camera, in the perspective case. In degrees.

Default 50.

near class-attribute instance-attribute

near = tag(sync=True)

Distance of near clipping plane.

Default 0.1.

far class-attribute instance-attribute

far = tag(sync=True)

Distance of far clipping plane.

Default 1000.

focal_distance class-attribute instance-attribute

focal_distance = tag(sync=True)

Modifier of viewport scale.

Corresponds to the number of pixels per meter. Default 1.

OrbitView

Bases: BaseView

A deck.gl OrbitView.

The OrbitView class is a subclass of View that creates a 3D camera that rotates around a target position. It is usually used for the examination of a 3D scene in non-geospatial use cases.

orbit_axis class-attribute instance-attribute

orbit_axis = tag(sync=True)

Axis with 360 degrees rotating freedom, either 'Y' or 'Z', default to 'Z'.

projection_matrix class-attribute instance-attribute

projection_matrix = tag(sync=True)

Projection matrix.

If projectionMatrix is not supplied, the View class will build a projection matrix from the following parameters:

fovy class-attribute instance-attribute

fovy = tag(sync=True)

Field of view covered by camera, in the perspective case. In degrees.

Default 50.

near class-attribute instance-attribute

near = tag(sync=True)

Distance of near clipping plane.

Default 0.1.

far class-attribute instance-attribute

far = tag(sync=True)

Distance of far clipping plane.

Default 1000.

orthographic class-attribute instance-attribute

orthographic = tag(sync=True)

Whether to create an orthographic or perspective projection matrix.

Default is false (perspective projection).

OrthographicView

Bases: BaseView

A deck.gl OrthographicView.

The OrthographicView class is a subclass of View that creates a top-down view of the XY plane. It is usually used for rendering 2D charts in non-geospatial use cases.

flip_y class-attribute instance-attribute

flip_y = tag(sync=True)

Whether to use top-left coordinates (true) or bottom-left coordinates (false).

Default true.

near class-attribute instance-attribute

near = tag(sync=True)

Distance of near clipping plane.

Default 0.1.

far class-attribute instance-attribute

far = tag(sync=True)

Distance of far clipping plane.

Default 1000.