Create a new drawing.
Application context (e.g. Cesium Viewer).
Optional
options: object = {}Drawing configuration (see class doc).
Access the current array of point positions.
The color applied to the points.
Indicates if drawing is finished.
The maximum number of points.
Visibility of the drawing (true = points shown).
Cancel this drawing (destroys if not already finished).
True if canceled, false if already finished.
Clean up resources and destroy the drawing. Called on cancel or when window is removed.
Manually trigger the finish callback.
Trigger drawing finalization (called internally). Removes last point if no maxPoints, sets finished to true.
Represents a basic drawing consisting of interactive 3D points (Cartesian coordinates).
Other drawing classes may extend this class to add more complex geometry.
Manages a set of points (via PointSet3D), supports callbacks for point interaction, controls visibility, completion, and destruction, and exposes key properties for external use.
Param: app
The main application/controller context.
Param: options
Configuration options.
Param: options.id
Unique identifier (default: uuidv4).
Param: options.cartesians
Initial Array of point coordinates.
Param: options.maxPoints
Maximum number of points allowed.
Param: options.color
Point color (default: MEASUREMENT_POINT_COLOR).
Param: options.addPoint
Whether to create the first point instantly.
Param: options.usePointSet3D
Whether to use PointSet3D for management.
Param: options.onMoveCallback
Called on any point move.
Param: options.onSetCallback
Called when a point is set.
Param: options.onFinishCallback
Called after drawing is finished.
Example