Home > @magiclane/maps-sdk > Path

Path class

Represents a path object.

Core

Signature:

export declare class Path 

Constructors

Constructor

Modifiers

Description

(constructor)(id)

Constructs a new instance of the Path class

Properties

Property

Modifiers

Type

Description

area

readonly

RectangleGeographicArea

Get path rectangle.

coordinates

readonly

Coordinates[]

Get read-only access to the internal coordinates list.

name

string

Get path name.

pointerId

readonly

number | bigint

wayPoints

readonly

number[]

Get read-only access to the internal waypoint list.

Methods

Method

Modifiers

Description

cloneReverse()

Clone reverse order path. Does not change the original path.

cloneStartEnd(start, end)

Clone path from the given coordinates.

Set start = end to create a circuit track.

create(params)

static

Create a path from a data buffer of a given format.

exportAs(pathFileFormat)

Export path coordinates in the requested data format.

fromCoordinates(coords)

static

Create a path from a list of coordinates.

fromCoordinatesWaypoints(params)

static

Create a path from list of coordinates and waypoints.

getCoordinatesAtPercent(coords, percent)

static

Get a coordinate along the path given by a fraction of the path length between 0.0 (departure point) and 1.0 (destination).

toLandmarkList()

Create a new landmark list from a path.