diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryMapRouteReaderAdapter.java b/OsmAnd-java/src/net/osmand/binary/BinaryMapRouteReaderAdapter.java index 29f336cdfe..d84c45c6dd 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryMapRouteReaderAdapter.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryMapRouteReaderAdapter.java @@ -200,6 +200,7 @@ public class BinaryMapRouteReaderAdapter { int nameTypeRule = -1; int refTypeRule = -1; int destinationTypeRule = -1; + int destinationRefTypeRule = -1; public RouteTypeRule quickGetEncodingRule(int id) { return routeEncodingRules.get(id); @@ -216,6 +217,8 @@ public class BinaryMapRouteReaderAdapter { refTypeRule = id; } else if (tags.equals("destination")) { destinationTypeRule = id; + } else if (tags.equals("destination:ref")) { + destinationRefTypeRule = id; } } diff --git a/OsmAnd-java/src/net/osmand/binary/RouteDataObject.java b/OsmAnd-java/src/net/osmand/binary/RouteDataObject.java index 5fa380dac9..22f5b11fbe 100644 --- a/OsmAnd-java/src/net/osmand/binary/RouteDataObject.java +++ b/OsmAnd-java/src/net/osmand/binary/RouteDataObject.java @@ -66,14 +66,18 @@ public class RouteDataObject { } public String getRef(){ - if(names != null ) { + if (names != null) { + String ref = names.get(region.destinationRefTypeRule); + if (ref != null) { + return ref; + } return names.get(region.refTypeRule); } return null; } public String getDestinationName(){ - if(names != null ) { + if(names != null) { return names.get(region.destinationTypeRule); } return null;