fix for #8198
This commit is contained in:
parent
3fa17b5997
commit
133e2ff142
2 changed files with 16 additions and 6 deletions
|
@ -1087,14 +1087,15 @@ public class RouteResultPreparation {
|
|||
t = attachKeepLeftInfoAndLanes(leftSide, prev, rr);
|
||||
}
|
||||
if (t != null) {
|
||||
t.setTurnAngle((float) -mpi);
|
||||
t.setTurnAngle((float) - mpi);
|
||||
}
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
private int[] getTurnLanesInfo(RouteSegmentResult prevSegm, int mainTurnType) { String turnLanes = getTurnLanesString(prevSegm);
|
||||
int[] lanesArray ;
|
||||
private int[] getTurnLanesInfo(RouteSegmentResult prevSegm, int mainTurnType) {
|
||||
String turnLanes = getTurnLanesString(prevSegm);
|
||||
int[] lanesArray;
|
||||
if (turnLanes == null) {
|
||||
if(prevSegm.getTurnType() != null && prevSegm.getTurnType().getLanes() != null
|
||||
&& prevSegm.getDistance() < 100) {
|
||||
|
|
|
@ -568,7 +568,6 @@ public class TurnPathHelper {
|
|||
|
||||
public static Path getPathFromTurnType(Resources res, int firstTurn,
|
||||
int secondTurn, int thirdTurn, int turnIndex, float coef, boolean leftSide, boolean smallArrow) {
|
||||
|
||||
int firstTurnType = TurnType.valueOf(firstTurn, leftSide).getValue();
|
||||
int secondTurnType = TurnType.valueOf(secondTurn, leftSide).getValue();
|
||||
int thirdTurnType = TurnType.valueOf(thirdTurn, leftSide).getValue();
|
||||
|
@ -606,6 +605,14 @@ public class TurnPathHelper {
|
|||
} else {
|
||||
turnResource = null;
|
||||
}
|
||||
} else if (TurnType.isSlightTurn(firstTurnType) && !TurnType.isSlightTurn(secondTurnType)
|
||||
&& !TurnType.isSlightTurn(thirdTurnType)) {
|
||||
if (TurnType.isLeftTurn(firstTurnType) && TurnType.isRightTurn(secondTurnType)
|
||||
&& TurnType.isLeftTurn(thirdTurnType)){
|
||||
turnResource = new TurnResource(secondTurnType, true, false, leftSide);
|
||||
} else if (TurnType.isRightTurn(firstTurnType) && TurnType.isLeftTurn(secondTurnType)
|
||||
&& TurnType.isRightTurn(thirdTurnType)) {
|
||||
turnResource = new TurnResource(secondTurnType, true, false, leftSide); }
|
||||
} else if (firstTurnType == TurnType.C || thirdTurnType == TurnType.C) {
|
||||
// get the small one
|
||||
turnResource = new TurnResource(secondTurnType, true, false, leftSide);
|
||||
|
@ -613,9 +620,11 @@ public class TurnPathHelper {
|
|||
turnResource = new TurnResource(secondTurnType, false, false, leftSide);
|
||||
}
|
||||
} else if (turnIndex == THIRD_TURN) {
|
||||
if ((TurnType.isLeftTurn(firstTurnType) || TurnType.isLeftTurn(secondTurnType)) && TurnType.isLeftTurn(thirdTurnType)) {
|
||||
if (((TurnType.isLeftTurn(firstTurnType) && !TurnType.isSlightTurn(firstTurnType))
|
||||
|| TurnType.isLeftTurn(secondTurnType)) && TurnType.isLeftTurn(thirdTurnType)) {
|
||||
turnResource = null;
|
||||
} else if ((TurnType.isRightTurn(firstTurnType) || TurnType.isRightTurn(secondTurnType)) && TurnType.isRightTurn(thirdTurnType)) {
|
||||
} else if (((TurnType.isRightTurn(firstTurnType) && !TurnType.isSlightTurn(firstTurnType))
|
||||
|| TurnType.isRightTurn(secondTurnType)) && TurnType.isRightTurn(thirdTurnType)) {
|
||||
turnResource = null;
|
||||
} else {
|
||||
turnResource = new TurnResource(thirdTurnType, true, false, leftSide);
|
||||
|
|
Loading…
Reference in a new issue