drawPolyline
drawPolyline (options) → object
Draws a polyline in the 3D Window.
Parameters
Name
|
Type
|
Description
|
options
|
Object
|
Name
|
Type
|
Default
|
Description
|
style
|
Object
|
Empty object
|
Object that contains all the properties of the Cesium PointGraphics object, e.g., width, shadows.
|
AltitudeMethod
|
AltitudeMethod
|
On ‘terrain (3)
|
An object that determines the altitude method. It can be set to any of the following:
§ RELATIVE_TO_MODEL = 0
§ RELATIVE_TO_TERRAIN = 1
§ ABSOLUTE = 2
§ ON_TERRAIN = 3
|
Altitude
|
Number
|
0
|
Initial altitude of the points drawn.
|
onMouseMove
|
drawing ~ onMouseMove
|
Empty function
|
Callback function called when the mouse is moved.
|
onPointUpdate
|
drawing ~ onPointUpdate
|
Empty function
|
Callback function called when a point is added or modified.
|
onFinish
|
drawing ~ onFinish
|
Empty function
|
Callback function called when the draw operation is complete.
|
onAbort
|
drawing ~ onAbort
|
Empty function
|
Callback function called when the draw operation is aborted.
|
useFirstPointAsAltitude
|
Boolean
|
False
|
A Boolean that determines whether to use the altitude of the first point drawn as the altitude for all the points.
|
intersectionStyle
|
object
|
Empty object
|
Object that contains all the properties of the Cesium PolylineGraphics object, e.g., material, width, shadows.
|
planeMode
|
Boolean
|
False
|
When set to true, the first three points define a plane, to which all points are aligned.
|
|
Returns
A helper object whose members enable control of the drawing operation. These include:
§ .finish() – finish the drawing
§ .abort() – cancel the drawing operation
§ cancelLastPoint() – cancel the last Point drawn
§ .options – override the initial styling set by the options (style) parameter
Example
TerraExplorer.drawing.drawPolyline({
style: {
followSurface: true,
width: 2,
material: new Cesium.Color(1.0, 0.84, 0.0, 1.0)
},
AltitudeMethod:TerraExplorer.AltitudeMethod.RELATIVE_TO_MODEL,
Altitude:0.1
})
Type Definitions