new SelectionIndicatorViewModel(scene, selectionIndicatorElement, container)
View model of SelectionIndicator.
| Name | Type | Description |
|---|---|---|
scene |
Scene |
A scene instance used for screen space coordinate conversion. |
selectionIndicatorElement |
Element |
The element that contains all the elements that make up the selection indicator. |
container |
Element |
DOM elements containing widgets. |
Members
-
computeScreenSpacePositionSelectionIndicatorViewModel~ComputeScreenSpacePosition
-
Get or set a function that converts the geographic location of an object to its screen spatial location.
- Default Value: SceneTransforms.wgs84ToWindowCoordinates
Example
selectionIndicatorViewModel.computeScreenSpacePosition = function(position, result) {
return SuperMap3D.SceneTransforms.wgs84ToWindowCoordinates(scene, position, result);
};
containerElement
Retrieve HTML elements containing selection indicators.
isVisibleBoolean
Obtain the visibility of the position indicator. When the selected object has no position, even if the object is already selected, the value can still be false.
positionCartesian3
Get or set the geographic location of the object displaying the selection indicator.
sceneScene
Get the scene being used.
selectionIndicatorElementElement
Retrieve the HTML element that saves the selection indicator.
showSelectionBoolean
Get or set the visibility of the selection indicator.
Methods
-
animateAppear()
-
Animate the indicator to draw attention to the selection.
-
animateDepart()
-
Animation indicator release selection.
-
update()
-
Update the selection indicator's view to match the position and content attributes of the view model.
Type Definitions
-
ComputeScreenSpacePosition(position, result){Cartesian2}
-
A function that converts the geographic location of an object into the spatial location of the screen.
Name Type Description positionCartesian3 The location represented by WGS84 (geographic) coordinates.
resultCartesian2 Object, used to return the input position converted to window coordinates.
Returns:
Type Description Cartesian2 The modified result parameters.