Class: SelectionIndicatorViewModel

SelectionIndicatorViewModel

new SelectionIndicatorViewModel(scene, selectionIndicatorElement, container)

SelectionIndicator 的视图模型。

Name Type Description
scene Scene

用于屏幕空间坐标转换的场景实例。

selectionIndicatorElement Element

包含构成选择指示器的所有元素的元素。

container Element

包含 widget 的 DOM 元素。

Members

获取或设置将对象的地理位置转换为屏幕空间位置的函数。

Default Value:
SceneTransforms.wgs84ToWindowCoordinates
Example
selectionIndicatorViewModel.computeScreenSpacePosition = function(position, result) {
    return SuperMap3D.SceneTransforms.wgs84ToWindowCoordinates(scene, position, result);
};

containerElement

获取包含选择指示符的 HTML 元素。

containerElement

获取包含选择指示符的 HTML 元素。

isVisibleBoolean

获取位置指示器的可见性。当所选对象没有位置时,即使对象已被选中,该值也可以为 false。

positionCartesian3

获取或设置显示选择指示器的对象的地理位置。

sceneScene

获取正在使用的场景。

sceneScene

获取正在使用的场景。

selectionIndicatorElementElement

获取保存选择指示符的 HTML 元素。

showSelectionBoolean

获取或设置选择指示符的可见性。

zoomIndicatorElementElement

获取保存选择指示符的 HTML 元素。

Methods

animateAppear()

将指示器动画化,以引起对选择的关注。

animateDepart()

动画指示器释放选择。

update()

更新选择指示器的视图,使其与视图模型的位置和内容属性相匹配。

Type Definitions

ComputeScreenSpacePosition(position, result){Cartesian2}

将物体的地理位置转换为屏幕空间位置的函数。

Name Type Description
position Cartesian3

以 WGS84(地理)坐标表示的位置。

result Cartesian2

对象,用于返回转换为窗口坐标的输入位置。

Returns:
Type Description
Cartesian2 修改后的结果参数。