Polyline

Polyline

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
other Polyline The polyline to compare for equality.
Returns:
Boolean true if 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.
See:

getPositions

Returns the polyline's positions.

See:

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:
Boolean true if 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;
See:

setColor

Sets the color of the polyline.

Parameters:
Name Type Description
value Color The color of the polyline.
Throws:
DeveloperError : value is required.
See:

setOutlineColor

Sets the outline color of the polyline.

Parameters:
Name Type Description
value Color The outline color of the polyline.
Throws:
DeveloperError : value 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(...)
  ])
);
See:

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:

<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;
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
value Number 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;
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
value Number 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;
See: