CesiumDragPoints

CesiumDragPoints

new CesiumDragPoints(terria, pointMovedCallback)

Source:

For letting user drag existing points in Cesium ViewerModes only.

Parameters:
Name Type Description
terria Terria

The Terria instance.

pointMovedCallback PointMovedCallback

A function that is called when a point is moved.

Members

_draggableObjects :CustomDataSource

Source:

List of entities that can be dragged, which is populated with user-created points only.

Type:

_dragInProgress :Bool

Source:

Whether user is currently dragging point.

Type:
  • Bool

_pointMovedCallback :PointMovedCallback

Source:
Default Value:
  • undefined

Callback that occurs when point is moved. Function takes a CustomDataSource which is a list of PointEntities.

Type:

dragCount :Number

Source:

For determining whether a drag has just occurred, to avoid deleting a point at the end of the drag.

Type:
  • Number

Methods

destroy()

Source:

A clean up function to call when destroying the object.

setUp()

Source:

Set up the drag point helper so that attempting to drag a point will move the point.

updateDraggableObjects(entities)

Source:

Update the list of draggable objects with a new list of entities that are able to be dragged. We are only interested in entities that the user has drawn.

Parameters:
Name Type Description
entities CustomDataSource

Entities that user has drawn on the map.