Class: MeasureMultiDistance

MeasureMultiDistance(viewer, optionsopt)

new MeasureMultiDistance(viewer, optionsopt)

MeasureMultiDistance class for measuring multi distances 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
color Cesium.Color <optional>
The color of the measurement line and points.
clampToGround boolean <optional>
Whether to clamp the measurement to the ground.
Source:
Example
const measureMultiDistance = new MeasureMultiDistance(viewer, { color: Cesium.Color.RED });
measureMultiDistance.on();
// To disable the measurement tool and clear entities:
measureMultiDistance.off();

Methods

off() → {void}

Disables the measurement tool and clears the entities.
Source:
Returns:
Type
void

on() → {boolean|void}

Enables the measurement tool. Click to start measuring, and click again drawing the lines. Left click to add points, right click to finish.
Source:
Returns:
  • Continue - Whether to continue measuring after the first click.
    Type
    boolean
  • Type
    void