Merge pull request #10541 from osmandapp/T8652
Add condition for 0 planRoadDirection
This commit is contained in:
commit
9673a14c0a
1 changed files with 8 additions and 5 deletions
|
@ -533,16 +533,19 @@ public class BinaryRoutePlanner {
|
||||||
long fid = to.getRoad().getId();
|
long fid = to.getRoad().getId();
|
||||||
for (int i = 0; i < from.getRoad().getRestrictionLength(); i++) {
|
for (int i = 0; i < from.getRoad().getRestrictionLength(); i++) {
|
||||||
long id = from.getRoad().getRestrictionId(i);
|
long id = from.getRoad().getRestrictionId(i);
|
||||||
|
int tp = from.getRoad().getRestrictionType(i);
|
||||||
if (fid == id) {
|
if (fid == id) {
|
||||||
int tp = from.getRoad().getRestrictionType(i);
|
if (tp == MapRenderingTypes.RESTRICTION_NO_LEFT_TURN
|
||||||
if (tp == MapRenderingTypes.RESTRICTION_NO_LEFT_TURN ||
|
|| tp == MapRenderingTypes.RESTRICTION_NO_RIGHT_TURN
|
||||||
tp == MapRenderingTypes.RESTRICTION_NO_RIGHT_TURN ||
|
|| tp == MapRenderingTypes.RESTRICTION_NO_STRAIGHT_ON
|
||||||
tp == MapRenderingTypes.RESTRICTION_NO_STRAIGHT_ON ||
|
|| tp == MapRenderingTypes.RESTRICTION_NO_U_TURN) {
|
||||||
tp == MapRenderingTypes.RESTRICTION_NO_U_TURN) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (tp == MapRenderingTypes.RESTRICTION_ONLY_STRAIGHT_ON) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue