
The SceneModePicker is a single button widget for switching between scene modes; shown to the left in its expanded state. Programatic switching of scene modes will be automatically reflected in the widget as long as the specified Scene is used to perform the change.
Name | Type | Default | Description |
---|---|---|---|
container |
Element | String | 将包含小部件的DOM元素或ID。 | |
scene |
Scene | 要使用的场景实例。 | |
duration |
Number |
2.0
|
optional 场景转换所需的时间(以秒为单位)。 |
Throws:
-
DeveloperError :文档中不存在id为“container”的元素。
Example:
// In HTML head, include a link to the SceneModePicker.css stylesheet,
// and in the body, include: <div id="sceneModePickerContainer"></div>
// Note: This code assumes you already have a Scene instance.
var sceneModePicker = new Cesium.SceneModePicker('sceneModePickerContainer', scene);
Members
获取父容器。
获取视图模型。
Methods
销毁小部件。如果是永久性的
正在从布局中删除小部件。
Returns:
如果对象已被销毁,则为true,否则为false。