Class: MeasurePosition

MeasurePosition(viewer, optionsopt)

new MeasurePosition(viewer, optionsopt)

MeasurePosition class for measuring position in a Cesium viewer.
Parameters:
Name Type Attributes Description
viewer Object The Cesium viewer instance.
options Object <optional>
Options for the measurement tool.
Properties
Name Type Attributes Description
textFormat string <optional>
The format of the measurement text. e.g. "({lon}, {lat}, {height})".
color Cesium.Color <optional>
The color of the measurement line and points.
Source:
Example
const measurePosition = new MeasurePosition(viewer, { color: Cesium.Color.RED });
measurePosition.on();
// To disable the measurement tool and clear entities:
measurePosition.off();

Methods

off() → {void}

Disables the position measurement tool.
Source:
Returns:
Type
void

on() → {void}

Enables the position measurement tool. Click to start measuring
Source:
Returns:
Type
void