|
@ -648,11 +648,13 @@ public class RouteResultPreparation {
|
|||
boolean leftTurn = TurnType.isLeftTurn(mainTurnType);
|
||||
int ind = leftTurn? 0 : lanesArray.length - 1;
|
||||
final int tt = TurnType.getPrimaryTurn(lanesArray[ind]);
|
||||
final int st = TurnType.getSecondaryTurn(lanesArray[ind]);
|
||||
if (leftTurn) {
|
||||
if (!TurnType.isLeftTurn(tt)) {
|
||||
// This was just to make sure that there's no bad data.
|
||||
TurnType.setPrimaryTurnAndReset(lanesArray, ind, TurnType.TL);
|
||||
TurnType.setSecondaryTurn(lanesArray, ind, tt);
|
||||
TurnType.setTertiaryTurn(lanesArray, ind, st);
|
||||
lanesArray[ind] |= 1;
|
||||
}
|
||||
} else {
|
||||
|
@ -660,6 +662,7 @@ public class RouteResultPreparation {
|
|||
// This was just to make sure that there's no bad data.
|
||||
TurnType.setPrimaryTurnAndReset(lanesArray, ind, TurnType.TR);
|
||||
TurnType.setSecondaryTurn(lanesArray, ind, tt);
|
||||
TurnType.setTertiaryTurn(lanesArray, ind, st);
|
||||
lanesArray[ind] |= 1;
|
||||
}
|
||||
}
|
||||
|
@ -1031,10 +1034,9 @@ public class RouteResultPreparation {
|
|||
(TurnType.isRightTurn(calcTurnType) && TurnType.isRightTurn(turn)) ||
|
||||
(TurnType.isLeftTurn(calcTurnType) && TurnType.isLeftTurn(turn))
|
||||
) {
|
||||
TurnType.setPrimaryTurnAndReset(lanes, i, turn);
|
||||
TurnType.setSecondaryTurn(lanes, i, primary);
|
||||
TurnType.setPrimaryTurnShiftOthers(lanes, i, turn);
|
||||
} else {
|
||||
TurnType.setSecondaryTurn(lanes, i, turn);
|
||||
TurnType.setSecondaryTurnShiftOthers(lanes, i, turn);
|
||||
}
|
||||
break; // Move on to the next lane
|
||||
}
|
||||
|
@ -1055,12 +1057,18 @@ public class RouteResultPreparation {
|
|||
if (TurnType.getSecondaryTurn(oLanes[i]) != 0) {
|
||||
possibleTurns.add(TurnType.getSecondaryTurn(oLanes[i]));
|
||||
}
|
||||
if (TurnType.getTertiaryTurn(oLanes[i]) != 0) {
|
||||
possibleTurns.add(TurnType.getTertiaryTurn(oLanes[i]));
|
||||
}
|
||||
} else {
|
||||
TIntArrayList laneTurns = new TIntArrayList();
|
||||
laneTurns.add(TurnType.getPrimaryTurn(oLanes[i]));
|
||||
if (TurnType.getSecondaryTurn(oLanes[i]) != 0) {
|
||||
laneTurns.add(TurnType.getSecondaryTurn(oLanes[i]));
|
||||
}
|
||||
if (TurnType.getTertiaryTurn(oLanes[i]) != 0) {
|
||||
laneTurns.add(TurnType.getTertiaryTurn(oLanes[i]));
|
||||
}
|
||||
possibleTurns.retainAll(laneTurns);
|
||||
if (possibleTurns.isEmpty()) {
|
||||
// No common turns, so can't determine anything.
|
||||
|
@ -1076,6 +1084,9 @@ public class RouteResultPreparation {
|
|||
if (TurnType.getSecondaryTurn(oLanes[i]) != 0) {
|
||||
possibleTurns.remove((Integer) TurnType.getSecondaryTurn(oLanes[i]));
|
||||
}
|
||||
if (TurnType.getTertiaryTurn(oLanes[i]) != 0) {
|
||||
possibleTurns.remove((Integer) TurnType.getTertiaryTurn(oLanes[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -158,6 +158,7 @@ public class TurnType {
|
|||
// 0 bit - 0/1 - to use or not
|
||||
// 1-5 bits - additional turn info
|
||||
// 6-10 bits - secondary turn
|
||||
// 11-15 bits - tertiary turn
|
||||
public void setLanes(int[] lanes) {
|
||||
this.lanes = lanes;
|
||||
}
|
||||
|
@ -182,6 +183,32 @@ public class TurnType {
|
|||
// Get the primary turn modifier for the lane
|
||||
return (laneValue >> 5);
|
||||
}
|
||||
|
||||
public static void setPrimaryTurnShiftOthers(int[] lanes, int lane, int turnType) {
|
||||
int pt = getPrimaryTurn(lanes[lane]);
|
||||
int st = getSecondaryTurn(lanes[lane]);
|
||||
//int tt = getTertiaryTurn(lanes[lane]);
|
||||
setPrimaryTurnAndReset(lanes, lane, turnType);
|
||||
setSecondaryTurn(lanes, lane, pt);
|
||||
setTertiaryTurn(lanes, lane, st);
|
||||
}
|
||||
|
||||
public static void setSecondaryTurnShiftOthers(int[] lanes, int lane, int turnType) {
|
||||
int st = getSecondaryTurn(lanes[lane]);
|
||||
//int tt = getTertiaryTurn(lanes[lane]);
|
||||
setSecondaryTurn(lanes, lane, turnType);
|
||||
setTertiaryTurn(lanes, lane, st);
|
||||
}
|
||||
|
||||
public static void setTertiaryTurn(int[] lanes, int lane, int turnType) {
|
||||
lanes[lane] &= ~(15 << 10);
|
||||
lanes[lane] |= (turnType << 10);
|
||||
}
|
||||
|
||||
public static int getTertiaryTurn(int laneValue) {
|
||||
// Get the primary turn modifier for the lane
|
||||
return (laneValue >> 10);
|
||||
}
|
||||
|
||||
|
||||
public int[] getLanes() {
|
||||
|
@ -241,11 +268,11 @@ public class TurnType {
|
|||
}
|
||||
|
||||
public static boolean isLeftTurn(int type) {
|
||||
return type == TL || type == TSHL || type == TSLL || type == TRU;
|
||||
return type == TL || type == TSHL || type == TSLL || type == TU || type == KL;
|
||||
}
|
||||
|
||||
public static boolean isRightTurn(int type) {
|
||||
return type == TR || type == TSHR || type == TSLR || type == TU;
|
||||
return type == TR || type == TSHR || type == TSLR || type == TRU || type == KR;
|
||||
}
|
||||
|
||||
public static boolean isSlightTurn(int type) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<resources>
|
||||
<string name="app_name">OsmAnd~</string>
|
||||
<string name="app_version">2.3.0</string>
|
||||
<string name="app_version">2.4.0</string>
|
||||
<!--
|
||||
Note: For our dev build apk's, the above "app_version" is provided (via osmand/build.xml) as the base version prefix to our build number in the format:
|
||||
X.X.X#YYYYZ , where
|
||||
|
|
BIN
OsmAnd/res/drawable-hdpi/map_turn_forward_keep_right.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_turn_forward_keep_right_small.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_turn_forward_turn_sharp.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_turn_forward_turn_sharp_small.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_turn_keep_right.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_turn_keep_right_small.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_turn_sharp_right.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_turn_sharp_right_small.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_shield_tap.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_shield_tap_small.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_transport_stop_small.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_forward.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_forward_keep_right.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.7 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_forward_right_turn.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_forward_small.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_forward_turn_sharp.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_forward_uturn_right.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.7 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_keep_right.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_keep_right_small.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_right.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_right2.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_right2_small.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_right_small.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_sharp_right.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_sharp_right_small.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_slight_right.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_slight_right_small.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_uturn.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_uturn_right.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_uturn_right_small.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_turn_uturn_small.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/widget_marker_triangle.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_shield_tap.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_shield_tap_small.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_transport_stop_small.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_forward.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_forward_keep_right.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_forward_right_turn.png
Normal file
After Width: | Height: | Size: 3 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 2 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_forward_small.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_forward_turn_sharp.png
Normal file
After Width: | Height: | Size: 3 KiB |
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_forward_uturn_right.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 2.1 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_keep_right.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_keep_right_small.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_right.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_right2.png
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_right2_small.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_right_small.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_sharp_right.png
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_sharp_right_small.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_slight_right.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_slight_right_small.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_uturn.png
Normal file
After Width: | Height: | Size: 4 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_uturn_right.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_uturn_right_small.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_turn_uturn_small.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/widget_marker_triangle.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-large/map_shield_tap.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large/map_shield_tap_small.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-large/map_transport_stop_small.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_forward.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_forward_keep_right.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_forward_keep_right_small.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_forward_right_turn.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_forward_right_turn_small.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_forward_slight_right_turn.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_forward_small.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_forward_turn_sharp.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_forward_turn_sharp_small.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_forward_uturn_right.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_forward_uturn_right_small.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_keep_right.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_keep_right_small.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_right.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_right2.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_right2_small.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_right_small.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_sharp_right.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_sharp_right_small.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_slight_right.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_slight_right_small.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_uturn.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_uturn_right.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_uturn_right_small.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large/map_turn_uturn_small.png
Normal file
After Width: | Height: | Size: 1.3 KiB |