ProjectionPicker 是一个单一的按钮小部件,用于在透视和正交投影之间切换。
| Name | Type | Description |
|---|---|---|
container |
Element | string | 包含小部件的 DOM 元素或 ID。 |
scene |
Scene | 要使用的场景实例. |
Throws:
-
DeveloperError : 文档中不存在 ID 为“container”的元素。
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
获取父容器.
获取视图模型.
Methods
销毁小部件。如果永久地,从布局中移除小部件,则应调用此方法.
Returns:
如果对象已被销毁则返回 true,否则返回 false.
