diff --git a/OsmAnd/res/drawable-hdpi/warnings_pedestrian.png b/OsmAnd/res/drawable-hdpi/warnings_pedestrian.png new file mode 100644 index 0000000000..6e5ab33167 Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/warnings_pedestrian.png differ diff --git a/OsmAnd/res/drawable-hdpi/warnings_railways.png b/OsmAnd/res/drawable-hdpi/warnings_railways.png new file mode 100644 index 0000000000..6e5ab33167 Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/warnings_railways.png differ diff --git a/OsmAnd/res/drawable-large/warnings_pedestrian.png b/OsmAnd/res/drawable-large/warnings_pedestrian.png new file mode 100644 index 0000000000..6e5ab33167 Binary files /dev/null and b/OsmAnd/res/drawable-large/warnings_pedestrian.png differ diff --git a/OsmAnd/res/drawable-large/warnings_railways.png b/OsmAnd/res/drawable-large/warnings_railways.png new file mode 100644 index 0000000000..6e5ab33167 Binary files /dev/null and b/OsmAnd/res/drawable-large/warnings_railways.png differ diff --git a/OsmAnd/src/net/osmand/plus/routing/AlarmInfo.java b/OsmAnd/src/net/osmand/plus/routing/AlarmInfo.java index 3a825bc071..ecdf3a19f2 100644 --- a/OsmAnd/src/net/osmand/plus/routing/AlarmInfo.java +++ b/OsmAnd/src/net/osmand/plus/routing/AlarmInfo.java @@ -11,12 +11,12 @@ public class AlarmInfo implements LocationPoint { SPEED_CAMERA(1), SPEED_LIMIT(2), BORDER_CONTROL(3), - TRAFFIC_CALMING(4), - TOLL_BOOTH(5), - STOP(6), - MAXIMUM(7), + RAILWAY(4), + TRAFFIC_CALMING(5), + TOLL_BOOTH(6), + STOP(7), PEDESTRIAN(8), - RAILWAY(9); + MAXIMUM(9); private int priority; @@ -118,6 +118,10 @@ public class AlarmInfo implements LocationPoint { } } else if("traffic_calming".equals(ruleType.getTag())) { 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) { alarmInfo.setLatLon(loc.getLatitude(), loc.getLongitude()); diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java index 0f34a9a0dc..2b4ab9db13 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java @@ -743,6 +743,10 @@ public class RouteInfoWidgetsFactory { locimgId = R.drawable.warnings_stop; text = ""; //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; if (visible) {