Measurement

SWVL new Cesium.Measurement(options)

An abstract class defining a measurement.
Name Type Description
options Object An object with the following properties:
Name Type Description
scene Scene The scene
units MeasureUnits The selected units of measurement
locale String optional The BCP 47 language tag string customizing language-sensitive number formatting. If undefined, the runtime's default locale is used. See the Intl page on MDN
primitives PrimitiveCollection A collection in which to store the measurement primitives
labels LabelCollection A collection in which to add the labels
points PointPrimitiveCollection A collection in which to add points

Members

readonly icon : String

Gets the icon.

readonly id : String

Gets the id.

readonly instructions : Array.<String>

Gets the instruction text.

selectedUnits : String

Gets selected units.

readonly thumbnail : String

Gets the thumbnail.

readonly type : String

Gets the type.

Methods

Destroys the widget.

handleClick(clickPosition)

Handles click events while performing a measurement.
Name Type Description
clickPosition Cartesian2 The click position
Handles double click events while performing a measurement.

handleLeftDown(mousePosition)

Handles left down mouse events while performing a measurement.
Name Type Description
mousePosition Cartesian2 The mouse position

handleLeftUp(mousePosition)

Handles left up mouse events while performing a measurement.
Name Type Description
mousePosition Cartesian2 The mouse position

handleMouseMove(mousePosition)

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

isDestroyed()Boolean

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