This commit is contained in:
Victor Shcherb 2018-05-25 23:12:50 +02:00
parent d902888f4a
commit f8246c5cf4
2 changed files with 16 additions and 0 deletions

View file

@ -236,6 +236,7 @@ public class RouteDataObject {
}
return null;
}
public String getName(String lang){
return getName(lang, false);
@ -684,6 +685,18 @@ public class RouteDataObject {
}
return direction;
}
public boolean isRoadDeleted() {
int[] pt = getTypes();
int sz = pt.length;
for (int i = 0; i < sz; i++) {
RouteTypeRule r = region.quickGetEncodingRule(pt[i]);
if ("osmand_change".equals(r.getTag()) && "delete".equals(r.getValue())) {
return true;
}
}
return false;
}
public boolean isStopApplicable(boolean direction, int intId, int startPointInd, int endPointInd) {
int[] pt = getPointTypes(intId);

View file

@ -71,6 +71,9 @@ public class RouteSegmentResult {
}
public void attachRoute(int roadIndex, RouteSegmentResult r){
if(r.getObject().isRoadDeleted()) {
return;
}
int st = Math.abs(roadIndex - startPointIndex);
if(attachedRoutes[st] == null) {
attachedRoutes[st] = new ArrayList<RouteSegmentResult>();