ScreenSpaceZoomCameraController

A camera controller that allows zooming the camera in and out based on the pointer location in screen space.

new Cesium.ScreenSpaceZoomCameraController(options)

Creates a new instance of ScreenSpaceZoomCameraController.
Name Type Description
options ScreenSpaceZoomCameraController.ControllerOptions optional The options for configuring the controller.
Example:
TODO

Members

Determines if the controller is enabled and should be updated by the host scene.
The rate at which the camera's zoom velocity decays over time.
Default Value: 6.0
The ratio of the camera's distance to the zoom target that defines how much the camera zooms in and out per second.
Default Value: 0.06
The rate at which the camera zooms in and out based on the mouse wheel delta.
Default Value: 0.1

Methods

Invoked when the controller is added to the DOM. Implement connectedCallback to set up any DOM event listeners.
Name Type Description
element HTMLElement The DOM element containing the Cesium scene.

disconnectedCallback(element)

Invoked when the controller is removed from the DOM. Implement disconnectedCallback to tear down any DOM event listeners.
Name Type Description
element HTMLElement The DOM element containing the Cesium scene.
Invoked when the controller is being updated the first time, immediately before update is called. Implement firstUpdate to perform one-time work after the relevant scene has begun its render loop. Some examples might include initializing simulation time values or adding a primitive to the scene.
Name Type Description
scene Scene
time JulianDate The current simulation time.
See:
Invoked once per frame. Implement update to modify the camera or other parts of the scene.
Name Type Description
scene Scene
time JulianDate The current simulation time.
See:

Type Definitions

Cesium.ScreenSpaceZoomCameraController.ControllerOptions

Cesium.ScreenSpaceZoomCameraController.DragEvent

Properties:
Name Type Description
startPosition Cartesian2 The position of the mouse when the drag started.
endPosition Cartesian2 The position of the mouse when the drag ended.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.