From 7af466ea1a6451b74fe76af0e572617beb4ca4a6 Mon Sep 17 00:00:00 2001 From: vshcherb Date: Mon, 7 Dec 2020 13:20:43 +0100 Subject: [PATCH] Update OpenstreetmapRemoteUtil.java --- .../src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java index 98256d0635..8cefebd9ad 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java @@ -417,8 +417,9 @@ public class OpenstreetmapRemoteUtil implements OpenstreetmapUtil { } } } - } else if (MapUtils.getDistance(n.getLatLon(), entity.getLatLon()) < 10) { - // avoid shifting due to round error + } else if (MapUtils.getDistance(n.getLatLon(), entity.getLatLon()) < 10 || + MapUtils.getDistance(n.getLatLon(), entity.getLatLon()) > 10000) { + // avoid shifting due to round error and avoid moving to more than 10 km n.setLatitude(entity.getLatitude()); n.setLongitude(entity.getLongitude()); }