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
|
@ -136,7 +136,7 @@ export default class LengthInput extends InputElement<string> {
|
|||
if (leaflet) {
|
||||
const first = leaflet.layerPointToLatLng(firstClickXY)
|
||||
const last = leaflet.layerPointToLatLng([dx, dy])
|
||||
const geoDist = Math.floor(GeoOperations.distanceBetween([first.lng, first.lat], [last.lng, last.lat]) * 10000) / 10
|
||||
const geoDist = Math.floor(GeoOperations.distanceBetween([first.lng, first.lat], [last.lng, last.lat]) * 10) / 10
|
||||
self.value.setData("" + geoDist)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue