SceneModePicker

new Cesium.SceneModePicker(container, scene, duration)

SceneModePicker是一个单按钮小部件,用于在场景模式之间切换; 左边显示的是膨胀状态。场景模式的程序化切换将 只要指定的场景,就会自动反映在小部件中 用于执行更改.


Name Type Default Description
container Element | string 将包含小部件的DOM元素或ID。
scene Scene 要使用的场景实例。
duration number 2.0 optional 以秒为单位,场景转换所需的时间。
Throws:
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.

const sceneModePicker = new Cesium.SceneModePicker('sceneModePickerContainer', scene);

Members

获取父容器。
获取视图模型。

Methods

销毁小部件。如果从布局中永久删除小部件, 则应该调用。
Returns:
如果对象已被销毁,则为true,否则为false。
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.