Merge develop

This commit is contained in:
Pieter Vander Vennet 2021-07-24 02:32:33 +02:00
commit 330930d5d4
77 changed files with 2462 additions and 581 deletions

View file

@ -276,6 +276,14 @@ export class GeoOperations {
}
return undefined;
}
/**
* Generates the closest point on a way from a given point
* @param way The road on which you want to find a point
* @param point Point defined as [lon, lat]
*/
public static nearestPoint(way, point: [number, number]){
return turf.nearestPointOnLine(way, point, {units: "kilometers"});
}
}