new MeasureArea(viewer, optionsopt)
MeasureArea class for measuring area in a Cesium viewer.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
viewer |
Cesium.Viewer | The Cesium viewer instance. | |
options |
Object |
<optional> |
Optional parameters for the measurement. |
- Source:
Example
const measureArea = new MeasureArea(viewer, { color: Cesium.Color.RED });
measureArea.on();
// To disable the measurement tool and clear entities:
measureArea.off();
Methods
off() → {void}
Disables the angle measurement tool and clears the entities.
- Source:
Returns:
- Type
- void
on() → {boolean|void}
Enables the area measurement tool.
Click to start measuring, and click again drawing the polygon.
Left click to add points, right click to finish.
- Source:
Returns:
-
Continue - Whether to continue measuring after the first click.
- Type
- boolean
-
- Type
- void