forked from MapComplete/MapComplete
GeoOperations.distanceBetween now uses meters, fix GPS tracking
This commit is contained in:
parent
79012c42ab
commit
680e56397d
10 changed files with 40 additions and 40 deletions
|
@ -30,12 +30,12 @@ export class GeoOperations {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the distance between the two points in kilometers
|
||||
* Returns the distance between the two points in meters
|
||||
* @param lonlat0
|
||||
* @param lonlat1
|
||||
*/
|
||||
static distanceBetween(lonlat0: [number, number], lonlat1: [number, number]) {
|
||||
return turf.distance(lonlat0, lonlat1)
|
||||
return turf.distance(lonlat0, lonlat1) * 1000
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue