Defines a connected sequence of line segments created as a single object. A polyline is a line consisting of one or more line segments joined end to end. Polylines, unlike polygons, are not necessarily closed.
new Polyline(
points
):Polyline
Creates a polyline from points.
Point
[] = []
Polyline points.
readonly
points:Point
[] =[]
Polyline points.
get id():
bigint
Returns object id.
bigint
get numberOfPoints():
number
Returns a number of points in polyline.
number
addPoint(
point
):void
Adds a new point to the end of the list of polyline points.
Added point.
void
addPoints(
points
):void
Adds new points to the end of the list of polyline points.
Point
[]
Added points.
void
point(
index
):Point
Returns the point at position index
in polyline. index
must be in the range [0, numberOfPoints()-1]
. Otherwise the result is undefined.
number
Point index.