Fix: tweaking addNewPoint-flow

This commit is contained in:
Pieter Vander Vennet 2023-05-19 01:37:31 +02:00
parent 63ffa11238
commit d0e0abdece
8 changed files with 149 additions and 62 deletions

View file

@ -701,6 +701,20 @@ export class GeoOperations {
return turf.bearing(a, b)
}
public static along(a: Coord, b: Coord, distanceMeter: number): Coord {
return turf.along(
<any> {
type:"Feature",
geometry:{
type:"LineString",
coordinates: [a, b]
}
}, distanceMeter, {units: "meters"}
).geometry.coordinates
}
/**
* Returns 'true' if one feature contains the other feature
*