new Cesium.SelectionIndicatorViewModel(scene, selectionIndicatorElement, container)

The view model for SelectionIndicator.
Name Type Description
scene Scene 用于屏幕空间坐标转换的场景实例 .
selectionIndicatorElement Element 包含构成选择指标的所有元素的元素.
container Element The DOM element that contains the widget.

Members

获取或设置将对象的世界位置转换为屏幕空间位置的函数.
Default Value: SceneTransforms.worldToWindowCoordinates
Example:
selectionIndicatorViewModel.computeScreenSpacePosition = function(position, result) {
    return Cesium.SceneTransforms.worldToWindowCoordinates(scene, position, result);
};

container : Element

获得含有选择指标的 NT 0 元素.

isVisible : boolean

获得位置指示器的可见度. 这可能是假的,即使 当选定对象没有位置时,选择对象.

position : Cartesian3

获取或设置用于显示选择指标的对象的世界位置.

scene : Scene

得到的场景被使用.

selectionIndicatorElement : Element

Gets the HTML element that holds the selection indicator.

showSelection : boolean

获取或设置选择指标的可见度.

Methods

animateAppear()

激活指示器以吸引对选择的注意.

animateDepart()

激活释放选择的指标.

update()

更新选择指标的视图,以匹配视图模型的位置和内容属性. 此函数应调用为渲染循环的一部分 .

Type Definitions

Cesium.SelectionIndicatorViewModel.ComputeScreenSpacePosition(position, result)Cartesian2

将物体的世界位置转换为屏幕空间位置的函数.
Name Type Description
position Cartesian3 WGS84 (世界)坐标中的位置.
result Cartesian2 返回转换为窗口坐标的输入位置的对象 .
Returns:
修改的结果参数 .
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.