DistanceMeasurement

new Cesium.DistanceMeasurement(options)

Draws a measurement between two points.
Name Type Description
options Object An object with the following properties:
Name Type Default Description
scene Scene The scene
units MeasureUnits The selected units of measurement
points PointPrimitiveCollection A collection for adding the point primitives
labels LabelCollection A collection for adding the labels
primitives PrimitiveCollection A collection for adding primitives
showComponentLines Boolean false optional Whether or not to show the x and y component lines

Members

readonlyangleFromHorizontal : Number

Gets the angle between horizontal and the distance line in radians

readonlyangleFromVertical : Number

Gets the angle between vertical and the distance line in radians

readonlydistance : Number

Gets the distance of the measurement in meters

readonlyhorizontalDistance : Number

Gets the horizontal component of distance of the measurement in meters
Gets the icon.
Gets the id.

readonlyinstructions : Array.<String>

Gets the instruction text.

readonlythumbnail : String

Gets the thumbnail.
Gets the type.

readonlyverticalDistance : Number

Gets the vertical component of the distance of the measurement in meters

Methods

Destroys the measurement.

handleClick(clickPosition)

Handles click events while drawing a distance measurement.
Name Type Description
clickPosition Cartesian2 The click position

handleMouseMove(mousePosition)

Handles mouse move events while drawing a distance measurement.
Name Type Description
mousePosition Cartesian2 The mouse position

isDestroyed()Boolean

Returns:
true if the object has been destroyed, false otherwise.
Resets the measurement.