From 3193c249ac642e0bb13e97ef67cd4a958ae6d678 Mon Sep 17 00:00:00 2001 From: MadWasp79 Date: Sun, 15 Dec 2019 12:49:36 +0200 Subject: [PATCH] move markers from starting point to road segments --- .../main/java/net/osmand/binary/GeocodingUtilities.java | 6 +++++- .../src/net/osmand/plus/avoidroads/AvoidRoadsDialog.java | 8 -------- 2 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 OsmAnd/src/net/osmand/plus/avoidroads/AvoidRoadsDialog.java diff --git a/OsmAnd-java/src/main/java/net/osmand/binary/GeocodingUtilities.java b/OsmAnd-java/src/main/java/net/osmand/binary/GeocodingUtilities.java index d39c5035a3..d2170308d7 100644 --- a/OsmAnd-java/src/main/java/net/osmand/binary/GeocodingUtilities.java +++ b/OsmAnd-java/src/main/java/net/osmand/binary/GeocodingUtilities.java @@ -192,7 +192,11 @@ public class GeocodingUtilities { } Collections.sort(lst, GeocodingUtilities.DISTANCE_COMPARATOR); if (lst.size() > 0) { - result.put(lst.get(0).point.getRoad(), point); + Location ll = new Location(""); + ll.setLatitude(lst.get(0).connectionPoint.getLatitude()); + ll.setLongitude(lst.get(0).connectionPoint.getLongitude()); + result.put(lst.get(0).point.getRoad(), ll); +// result.put(lst.get(0).point.getRoad(), point); if (progressCallbackWeakRef.get() != null) { int progress = (int) (i * 100.0/batchSize); if (progress > prevProgress) { diff --git a/OsmAnd/src/net/osmand/plus/avoidroads/AvoidRoadsDialog.java b/OsmAnd/src/net/osmand/plus/avoidroads/AvoidRoadsDialog.java deleted file mode 100644 index c48e62e550..0000000000 --- a/OsmAnd/src/net/osmand/plus/avoidroads/AvoidRoadsDialog.java +++ /dev/null @@ -1,8 +0,0 @@ -package net.osmand.plus.avoidroads; - -import net.osmand.plus.base.BaseOsmAndDialogFragment; - -public class AvoidRoadsDialog extends BaseOsmAndDialogFragment { - - -}