Cesium Viewer/host reference.
Optional
options: object = {}See class doc for keys.
Reference to the parent Cesium Viewer or app.
Unique identifier for this measurement instance.
Label associated with this measurement (unit and prefix are forwarded).
Finish callback (settable by onFinish()
).
Identifies a parent group if present.
The area of the polygon in the given unit.
Measurement points, as an array or CallbackProperty.
Main color for the polygon/outline/points.
Completion/finished flag for lifecycle control.
Expose the vertex array for external reading.
Show or hide the measurement visuals and drawing.
Measurement unit for calculations and display.
Calculates the area of the current polygon in 3D, accounting for triangulation. Uses PolygonPipeline.triangulate and sums triangle areas.
Area if valid, undefined otherwise.
Calculates the (geometric) center of all measurement points.
Array [x, y, z] or undefined if no points.
Cancels and destroys the polygon measurement.
True if canceled (destroyed), false if already gone.
Removes all visualizations and labels from the scene.
Set a callback to fire when measurement is finished. Chainable.
Locks/finishes the measurement if valid (min. 3 points). Triggers label positioning and value update.
True if finalized, false otherwise.
Update the label (position + value) dynamically using the polygon centroid and computed area.
PolygonMeasurement – Interactive measurement tool for computing polygon areas in a Cesium 3D scene.
Extends Measurement and leverages PolygonDrawing to:
Param: app
Cesium Viewer or host application reference.
Param: options
Param: options.cartesians
Initial vertices of the polygon.
Param: options.maxPoints
(Optional) Maximum number of polygon vertices.
Param: options.addPoint
If true, the first vertex is added instantly.
Param: options.color
Polygon fill/point color.
Param: options.unit
Area unit label.
Param: options.render
Immediately render the polygon.
Param: options.parentId
Optional parent identifier if used in grouped measurements.
Example