Merge pull request #1012 from Bars107/master
Railways and pedestrian warnings.
This commit is contained in:
commit
41e4aa472f
6 changed files with 13 additions and 5 deletions
BIN
OsmAnd/res/drawable-hdpi/warnings_pedestrian.png
Normal file
BIN
OsmAnd/res/drawable-hdpi/warnings_pedestrian.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
OsmAnd/res/drawable-hdpi/warnings_railways.png
Normal file
BIN
OsmAnd/res/drawable-hdpi/warnings_railways.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
OsmAnd/res/drawable-large/warnings_pedestrian.png
Normal file
BIN
OsmAnd/res/drawable-large/warnings_pedestrian.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
OsmAnd/res/drawable-large/warnings_railways.png
Normal file
BIN
OsmAnd/res/drawable-large/warnings_railways.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
|
@ -11,12 +11,12 @@ public class AlarmInfo implements LocationPoint {
|
||||||
SPEED_CAMERA(1),
|
SPEED_CAMERA(1),
|
||||||
SPEED_LIMIT(2),
|
SPEED_LIMIT(2),
|
||||||
BORDER_CONTROL(3),
|
BORDER_CONTROL(3),
|
||||||
TRAFFIC_CALMING(4),
|
RAILWAY(4),
|
||||||
TOLL_BOOTH(5),
|
TRAFFIC_CALMING(5),
|
||||||
STOP(6),
|
TOLL_BOOTH(6),
|
||||||
MAXIMUM(7),
|
STOP(7),
|
||||||
PEDESTRIAN(8),
|
PEDESTRIAN(8),
|
||||||
RAILWAY(9);
|
MAXIMUM(9);
|
||||||
|
|
||||||
private int priority;
|
private int priority;
|
||||||
|
|
||||||
|
@ -118,6 +118,10 @@ public class AlarmInfo implements LocationPoint {
|
||||||
}
|
}
|
||||||
} else if("traffic_calming".equals(ruleType.getTag())) {
|
} else if("traffic_calming".equals(ruleType.getTag())) {
|
||||||
alarmInfo = new AlarmInfo(AlarmInfoType.TRAFFIC_CALMING, locInd);
|
alarmInfo = new AlarmInfo(AlarmInfoType.TRAFFIC_CALMING, locInd);
|
||||||
|
} else if ("railway".equals(ruleType.getTag()) && "level_crossing".equals(ruleType.getValue())) {
|
||||||
|
alarmInfo = new AlarmInfo(AlarmInfoType.RAILWAY, locInd);
|
||||||
|
} else if ("crossing".equals(ruleType.getTag()) && "uncontrolled".equals(ruleType.getValue())){
|
||||||
|
alarmInfo = new AlarmInfo(AlarmInfoType.PEDESTRIAN, locInd);
|
||||||
}
|
}
|
||||||
if(alarmInfo != null) {
|
if(alarmInfo != null) {
|
||||||
alarmInfo.setLatLon(loc.getLatitude(), loc.getLongitude());
|
alarmInfo.setLatLon(loc.getLatitude(), loc.getLongitude());
|
||||||
|
|
|
@ -743,6 +743,10 @@ public class RouteInfoWidgetsFactory {
|
||||||
locimgId = R.drawable.warnings_stop;
|
locimgId = R.drawable.warnings_stop;
|
||||||
text = "";
|
text = "";
|
||||||
//text = "STOP";
|
//text = "STOP";
|
||||||
|
} else if(alarm.getType() == AlarmInfoType.RAILWAY) {
|
||||||
|
locimgId = R.drawable.warnings_railways;
|
||||||
|
} else if(alarm.getType() == AlarmInfoType.PEDESTRIAN) {
|
||||||
|
locimgId = R.drawable.warnings_pedestrian;
|
||||||
}
|
}
|
||||||
visible = (text != null && text.length() > 0) || locimgId != 0;
|
visible = (text != null && text.length() > 0) || locimgId != 0;
|
||||||
if (visible) {
|
if (visible) {
|
||||||
|
|
Loading…
Reference in a new issue