From ff03c5db1991f6c14512f59f8b669fe734680579 Mon Sep 17 00:00:00 2001 From: MadWasp79 Date: Sun, 15 Dec 2019 13:24:14 +0200 Subject: [PATCH] add parial interaction with points (but without ability to remove point from list, for now) --- .../net/osmand/plus/views/ImpassableRoadsLayer.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java b/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java index 2ea34dcde3..9e42abbb06 100644 --- a/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java @@ -179,6 +179,19 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements } } } + + for (Map.Entry entry : avoidRoadsHelper.getRoadsToAvoid().entrySet()) { + LatLon location = new LatLon(entry.getValue().getLatitude(), entry.getValue().getLongitude()); + RouteDataObject road = entry.getKey(); + if (location != null && road != null) { + int x = (int) tileBox.getPixXFromLatLon(location.getLatitude(), location.getLongitude()); + int y = (int) tileBox.getPixYFromLatLon(location.getLatitude(), location.getLongitude()); + if (calculateBelongs(ex, ey, x, y, compare)) { + compare = radius; + o.add(road); + } + } + } } }