Class: SceneModePicker

SceneModePicker

new SceneModePicker(container, scene, duration)

Scene Mode Picker is a single button component used to switch between scene modes; The left side displays its unfolded state. As long as the specified scene is used to perform scene mode switching, the programmed scene mode switching will be automatically reflected in the component.


Name Type Default Description
container Element | String

The DOM element or ID that contains the widget.

scene Scene

The scenario instance to be used.

duration Number 2.0 optional

The time required for scene transition (in seconds).

Throws:

There is no element with ID 'container' in the document.

Type
DeveloperError
Example
// In HTML head, include a link to the SceneModePicker.css stylesheet,
// and in the body, include: 
// Note: This code assumes you already have a Scene instance. var sceneModePicker = new SuperMap3D.SceneModePicker('sceneModePickerContainer', scene);

Members

containerElement

Retrieve the parent container.

Obtain the view model.

Methods

destroy()

Destruction of components. The removal of widgets from the layout should be called in the following situations.

isDestroyed(){Boolean}

Returns:
Type Description
Boolean If the object has been destroyed, it is true; otherwise, it is false.