Skip to content

Commit

Permalink
Destination ref vs exit ref
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanPyrohivskyi committed Nov 29, 2024
1 parent 01b0d91 commit 1446edb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions OsmAnd-java/src/main/java/net/osmand/router/ExitInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ public String getExitStreetName() {
public void setExitStreetName(String exitStreetName) {
this.exitStreetName = exitStreetName;
}

public boolean isEmpty() {
return ref == null && exitStreetName == null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ private static List<RouteSegmentResult> convertVectorResult(List<RouteDirectionI
exitInfo.setRef(current.getObject().getExitRef());
exitInfo.setExitStreetName(current.getObject().getExitName());
info.setExitInfo(exitInfo);
if (routeInd > 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);
Expand Down

0 comments on commit 1446edb

Please sign in to comment.