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
|
@ -225,7 +225,7 @@ export default class CreateWayWithPointReuseAction extends OsmChangeAction {
|
|||
const coor = coordinates[i]
|
||||
// Check closeby (and probably identical) point further in the coordinate list, mark them as duplicate
|
||||
for (let j = i + 1; j < coordinates.length; j++) {
|
||||
if (1000 * GeoOperations.distanceBetween(coor, coordinates[j]) < 0.1) {
|
||||
if (GeoOperations.distanceBetween(coor, coordinates[j]) < 0.1) {
|
||||
coordinateInfo[j] = {
|
||||
lngLat: coor,
|
||||
identicalTo: i
|
||||
|
@ -244,7 +244,7 @@ export default class CreateWayWithPointReuseAction extends OsmChangeAction {
|
|||
}[] = []
|
||||
for (const node of allNodes) {
|
||||
const center = node.geometry.coordinates
|
||||
const d = 1000 * GeoOperations.distanceBetween(coor, center)
|
||||
const d = GeoOperations.distanceBetween(coor, center)
|
||||
if (d > maxDistance) {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue