Class: CesiumDragPoints

CesiumDragPoints(terria, pointMovedCallback)

new CesiumDragPoints(terria, pointMovedCallback)

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.

Source:

Members

_draggableObjects :CustomDataSource

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

Type:
Source:

_dragInProgress :Bool

Whether user is currently dragging point.

Type:
  • Bool
Source:

_pointMovedCallback :PointMovedCallback

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

Type:
Default Value:
  • undefined
Source:

dragCount :Number

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

Type:
  • Number
Source:

Methods

destroy()

A clean up function to call when destroying the object.

Source:

setUp()

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

Source:

updateDraggableObjects(entities)

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.

Source: