Home > @magiclane/maps-sdk > Path > getCoordinatesAtPercent
Path.getCoordinatesAtPercent() method
Get a coordinate along the path given by a fraction of the path length between 0.0 (departure point) and 1.0 (destination).
Signature:
static getCoordinatesAtPercent(coords: Coordinates[], percent: number): Coordinates;Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
coords |
The path coordinates list. | |
|
percent |
number |
The size percent (fraction) in the range {0, 1}, e.g. 0.5 will return the coordinates of the point in the middle of the path. |
Returns:
The coordinates at the given percent