Skip to content

ScreenSpaceZoomCameraController

ScreenSpaceZoomCameraController zooms the camera towards a picked world position via scroll or drag. It is one of the alternative camera controllers added in Cesium 1.144, built on the composable Controller framework, and pairs with the pan and tilt/orbit controllers to make up a complete asset inspection camera.

Cesium’s built-in camera controller keeps handling input unless it is turned off, so mount ScreenSpaceCameraController with enableInputs={false} alongside this component.

Inside Viewer or CesiumWidget components. The controller is registered with the scene’s ControllerHost.

Property Type Description
enabled boolean
maximumZoomDistance number
inertiaEnabled boolean
inertialDecay number
pickWorldPosition (…params: any[]) => any
dampingEnabled boolean
maximumZoomVelocity number
usePointerPosition boolean
zoomAnimationDuration number
zoomDistanceRatio number
zoomSensitivity number
Property Type Description
dragInputs InputBinding[] | undefined Mouse button and optional keyboard modifier combinations that zoom by dragging. Bindings are attached once when the controller is registered, so changing this prop re-creates the controller rather than mutating it in place.
scrollInputs ScreenSpaceEventType[] | undefined Screen space event types that zoom by scrolling (for example ScreenSpaceEventType.WHEEL). Attached once at registration, so changing this prop re-creates the controller.

N/A

Property Type Description
priority number | undefined Precedence relative to other registered controllers. 0 applies before every other controller; omitting it makes this controller the highest priority. Changing this prop re-registers the controller.