new Polyline
DOC_TBA
Methods
-
equals
-
Determines if this polyline equals another polyline. Polylines are equal if all their properties are equal. Polylines in different collections can be equal.
Parameters:
Name Type Description otherPolyline The polyline to compare for equality. Returns:
Booleantrueif the polylines are equal; otherwise,false. -
getColor
-
Returns the color of the polyline.
Returns:
Color The color of the polyline.See:
-
getOutlineColor
-
Gets the outline color of the polyline.
Returns:
Color The outline color of the polyline. -
getPositions
-
Returns 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:
Booleantrueif this polyline will be shown; otherwise,false.See:
-
getWidth
-
Gets the width of the polyline. The actual width used is clamped to the minimum and maximum width supported by the WebGL implementation. These can be queried with Context#getMinimumAliasedLineWidth and Context#getMaximumAliasedLineWidth.
Returns:
Number The width of the polyline.Example
// 3 pixel total width, 1 pixel interior width polyline.width = 1.0; polyline.outlineWidth = 3.0;
- Polyline#setWidth
- Context#getMinimumAliasedLineWidth
- Context#getMaximumAliasedLineWidth
See:
-
setColor
-
Sets the color of the polyline.
Parameters:
Name Type Description valueColor The color of the polyline. Throws:
DeveloperError : value is required.See:
-
setOutlineColor
-
Sets the outline color of the polyline.
Parameters:
Name Type Description valueColor The outline color of the polyline. Throws:
DeveloperError : value is required. -
setPositions
-
Defines the positions of the polyline.
Parameters:
Name Type Description valueArray 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 valueBoolean Indicates if this polyline will be shown. Throws:
DeveloperError : value is required.See:
-
<static> prototype.getOutlineWidth
-
Gets the outline width of the polyline. The actual width used is clamped to the minimum and maximum width supported by the WebGL implementation. These can be queried with Context#getMinimumAliasedLineWidth and Context#getMaximumAliasedLineWidth.
Returns:
Number The outline width of the polyline.Example
// 3 pixel total width, 1 pixel interior width polyline.width = 1.0; polyline.outlineWidth = 3.0;
- Polyline#setOutlineWidth
- Context#getMinimumAliasedLineWidth
- Context#getMaximumAliasedLineWidth
See:
-
<static> prototype.setOutlineWidth
-
Sets the outline width of the polyline. The actual width used is clamped to the minimum and maximum width supported by the WebGL implementation. These can be queried with Context#getMinimumAliasedLineWidth and Context#getMaximumAliasedLineWidth.
Parameters:
Name Type Description valueNumber The outline width of the polyline. Throws:
DeveloperError : value is required.Example
// 3 pixel total width, 1 pixel interior width polyline.width = 1.0; polyline.outlineWidth = 3.0;
- Polyline#getOutlineWidth
- Context#getMinimumAliasedLineWidth
- Context#getMaximumAliasedLineWidth
See:
-
<static> prototype.setWidth
-
Sets the width of the polyline. The actual width used is clamped to the minimum and maximum width supported by the WebGL implementation. These can be queried with Context#getMinimumAliasedLineWidth and Context#getMaximumAliasedLineWidth.
Parameters:
Name Type Description valueNumber The width of the polyline. Throws:
DeveloperError : value is required.Example
// 3 pixel total width, 1 pixel interior width polyline.width = 1.0; polyline.outlineWidth = 3.0;
