ProjectionPicker

new Cesium.ProjectionPicker(container, scene)

The ProjectionPicker is a single button widget for switching between perspective and orthographic projections.
Name Type Description
container Element | String The DOM element or ID that will contain the widget.
scene Scene The Scene instance to use.
Throws:
  • DeveloperError : Element with id "container" does not exist in the document.
Example:
// In HTML head, include a link to the ProjectionPicker.css stylesheet,
// and in the body, include: <div id="projectionPickerContainer"></div>
// Note: This code assumes you already have a Scene instance.

const projectionPicker = new Cesium.ProjectionPicker('projectionPickerContainer', scene);

Members

Gets the parent container.
Gets the view model.

Methods

Destroys the widget. Should be called if permanently removing the widget from layout.
Returns:
true if the object has been destroyed, false otherwise.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.