Hide menu
Loading...
Searching...
No Matches
Polyline

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.

Extends

Constructors

new Polyline()

new Polyline(points): Polyline

Creates a polyline from points.

Parameters

points

Point[] = []

Polyline points.

Returns

Polyline

Overrides

Geometry.constructor

Properties

points

readonly points: Point[] = []

Polyline points.

Accessors

id

Get Signature

get id(): bigint

Returns object id.

Returns

bigint

Inherited from

Geometry.id


numberOfPoints

Get Signature

get numberOfPoints(): number

Returns a number of points in polyline.

Returns

number

Methods

addPoint()

addPoint(point): void

Adds a new point to the end of the list of polyline points.

Parameters

point

Point

Added point.

Returns

void


addPoints()

addPoints(points): void

Adds new points to the end of the list of polyline points.

Parameters

points

Point[]

Added points.

Returns

void


point()

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.

Parameters

index

number

Point index.

Returns

Point