Update OpenstreetmapRemoteUtil.java
This commit is contained in:
parent
c413626490
commit
7af466ea1a
1 changed files with 3 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue