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
|
- 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.
Returns:
- Type
- void
on() → {void}
Enables the position measurement tool.
Click to start measuring
Returns:
- Type
- void