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