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.
var projectionPicker = new Cesium.ProjectionPicker('projectionPickerContainer', scene);