Create a new interactive line drawing instance.
Main Cesium application or viewer.
Optional
options: object = {}See class doc for keys.
Cesium entity for the rendered polyline.
Access the current array of point positions.
The color applied to the points.
Indicates if drawing is finished.
Main color for the polyline.
The maximum number of points.
Main color for the points.
The points in the drawing (including the current one if not finished). Setting the points array is a no-op.
Control visibility of points and the line.
Visibility of the drawing (true = points shown).
Cancel this drawing (destroys if not already finished).
True if canceled, false if already finished.
Remove all Cesium entities and clean up.
Manually trigger the finish callback.
Finalize (lock-in) line only if both points are set.
True if finish is allowed, false if not enough points.
LineDrawing – Concrete drawing class for creating and interacting with a 3D line (2 points) in a Cesium scene.
Extends Drawing for the specialized use case of drawing simple lines:
Param: app
The Cesium or host application instance/context.
Param: options
Param: options.cartesians
Array of initial Cartesian points.
Param: options.pointColor
Color applied to points.
Param: options.lineColor
Color for the line.
Param: options.addPoint
If true, entry begins with first point added.
Param: options.onMoveCallback
Callback on point movement.
Example