new Polyline
A renderable polyline. Create this by calling PolylineCollection#add
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
options.show |
Boolean |
<optional> |
true | true if this polyline will be shown; otherwise, false . |
options.width |
Number |
<optional> |
1.0 | The width of the polyline in pixels. |
options.loop |
Boolean |
<optional> |
false | Whether a line segment will be added between the last and first line positions to make this line a loop. |
options.material |
Material |
<optional> |
Material.ColorType | The material. |
options.positions |
Array |
<optional> |
The positions. | |
options.id |
Object |
<optional> |
The user-defined object to be returned when this polyline is picked. |
Demo:
See:
Source:
Members
-
id :Object
-
Gets or sets the user-defined object returned when the polyline is picked.
-
loop :Boolean
-
Gets and sets whether a line segment will be added between the first and last polyline positions.
-
material :Material
-
Gets and sets the surface appearance of the polyline. This can be one of several built-in Material objects or a custom material, scripted with Fabric.
-
positions :Array
-
Gets and sets the positions of the polyline.
Example
polyline.positions = ellipsoid.cartographicArrayToCartesianArray([ new Cesium.Cartographic(...), new Cesium.Cartographic(...), new Cesium.Cartographic(...) ]);
-
show :Boolean
-
Determines if this polyline will be shown. Use this to hide or show a polyline, instead of removing it and re-adding it to the collection.
-
width :Number
-
Gets and sets the width of the polyline.