new Polyline
DOC_TBA
Demo:
Source:
Methods
-
getId
-
Returns the user-defined object returned when the polyline is picked.
Returns:
Object The user-defined object returned when the polyline is picked. -
getMaterial
-
Gets the surface appearance of the polyline. This can be one of several built-in Material objects or a custom material, scripted with Fabric.
Returns:
Material The material. -
getPositions
-
Returns the polyline's positions.
Returns:
Array The polyline's positions. -
getShow
-
Returns true if this polyline will be shown. Call Polyline#setShow to hide or show a polyline, instead of removing it and re-adding it to the collection.
Returns:
Booleantrue
if this polyline will be shown; otherwise,false
.See:
-
getWidth
-
Gets the width of the polyline.
Returns:
Number The width of the polyline.Example
polyline.setWidth(5.0); var width = polyline.getWidth(); // 5.0
See:
-
setMaterial
-
Sets the surface appearance of the polyline. This can be one of several built-in Material objects or a custom material, scripted with Fabric.
Parameters:
Name Type Description material
Material The material Throws:
DeveloperError : material is required.See:
-
setPositions
-
Defines the positions of the polyline.
Parameters:
Name Type Description value
Array The positions of the polyline. Throws:
DeveloperError : value is required.Example
polyline.setPositions( ellipsoid.cartographicArrayToCartesianArray([ new Cartographic3(...), new Cartographic3(...), new Cartographic3(...) ]) );
-
setShow
-
Determines if this polyline will be shown. Call this to hide or show a polyline, instead of removing it and re-adding it to the collection.
Parameters:
Name Type Description value
Boolean Indicates if this polyline will be shown. Throws:
DeveloperError : value is required.See:
-
setWidth
-
Sets the width of the polyline.
Parameters:
Name Type Description value
Number The width of the polyline. Throws:
DeveloperError : value is required.Example
polyline.setWidth(5.0); var width = polyline.getWidth(); // 5.0
See: