diff --git a/OsmAnd-java/src/main/java/net/osmand/router/ExitInfo.java b/OsmAnd-java/src/main/java/net/osmand/router/ExitInfo.java index 3f51d0f9d0d..ca8e853f7bf 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/ExitInfo.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/ExitInfo.java @@ -22,4 +22,8 @@ public String getExitStreetName() { public void setExitStreetName(String exitStreetName) { this.exitStreetName = exitStreetName; } + + public boolean isEmpty() { + return ref == null && exitStreetName == null; + } } diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index 65a49ed5771..6010670e6c3 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -459,7 +459,7 @@ private static List convertVectorResult(List 0 && (exitInfo.getRef() != null || exitInfo.getExitStreetName() != null)) { + if (!exitInfo.isEmpty() && info.getDestinationRef() == null && routeInd > 0) { // set ref and road name (or shield icon) from previous segment because exit point is not consist of highway ref RouteSegmentResult previous; previous = list.get(routeInd - 1);