This commit is contained in:
xmd5a 2015-08-04 12:38:32 +03:00
commit 93b1311647
12 changed files with 40 additions and 36 deletions

View file

@ -66,15 +66,15 @@ public class BinaryInspector {
// test cases show info
if(args.length == 1 && "test".equals(args[0])) {
in.inspector(new String[]{
// "-vpoi",
"-vmap", "-vmapobjects", // "-vmapcoordinates",
"-vpoi",
// "-vmap", "-vmapobjects", // "-vmapcoordinates",
// "-vrouting",
// "-vaddress", "-vcities","-vstreetgroups",
// "-vstreets", "-vbuildings", "-vintersections",
// "-zoom=15",
// "-bbox=1.74,51.17,1.75,51.16",
// "-vstats",
"/Users/victorshcherb/osmand/maps/Luxembourg_europe_2.road.obf"
"/Users/victorshcherb/osmand/maps/Synthetic_test_rendering.obf"
// "/Users/victorshcherb/osmand/temp/Czech-republic_jihovychod_europe_2.road.obf"
});
} else {

View file

@ -248,7 +248,7 @@ public class RouteDataObject {
String pref = v.substring(i, v.length()).trim();
float add = 0;
for(int ik = 0; ik < pref.length(); ik++) {
if(Character.isDigit(pref.charAt(ik)) || pref.charAt(ik) == '.' || pref.charAt(ik) == '-') {
if(Algorithms.isDigit(pref.charAt(ik)) || pref.charAt(ik) == '.' || pref.charAt(ik) == '-') {
int first = Algorithms.findFirstNumberEndIndex(pref.substring(ik));
if(first != -1) {
add = parseLength(pref.substring(ik), 0);

View file

@ -144,7 +144,7 @@ public class Algorithms {
}
}
private static boolean isDigit(char charAt) {
public static boolean isDigit(char charAt) {
return charAt >= '0' && charAt <= '9';
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -957,4 +957,8 @@
<string name="poi_fee_no">Бясплатна</string>
<string name="poi_monitoring_station">Станцыя назіраньня</string>
<string name="poi_email">Эл. пошта</string>
<string name="poi_fax">Факс</string>
<string name="poi_facebook">Фэйсбук</string>
<string name="poi_mobile">Сотавы тэлефон</string>
</resources>

View file

@ -1918,7 +1918,7 @@
<string name="shared_string_currently_recording_track">Бягучы сьлед, які запісваецца</string>
<string name="plugin_touringview_name">Турыстычная мапа</string>
<string name="rename_failed">Не атрымалася перайменаваць.</string>
<string name="days_behind">дз. таму</string>
<string name="days_behind">д. таму абнаўлялі</string>
<string name="shared_string_release">Выдана</string>
<string name="shared_string_my_favorites">Мае ўлюбёныя</string>
<string name="confirmation_to_clear_history">Вы хочаце вычысьціць гісторыю?</string>

View file

@ -964,4 +964,8 @@
<string name="poi_capital">Hovedstad</string>
<string name="poi_fee_no">Inget gebyr</string>
<string name="poi_email">E-mail</string>
<string name="poi_fax">Fax</string>
<string name="poi_facebook">Facebook</string>
<string name="poi_mobile">Mobiltelefon</string>
</resources>

View file

@ -2109,4 +2109,6 @@
<string name="successfully_uploaded_pattern">Sėkmingai išsiųsta {0}/{1}</string>
<string name="try_again">Pabandykite vėl</string>
<string name="error_message_pattern">Klaida: {0}</string>
</resources>
<string name="traffic_warning_hazard">Pavojus</string>
<string name="rendering_value_boldOutline_name">Paryškintas kontūras</string>
</resources>

View file

@ -946,4 +946,8 @@
<string name="poi_capital">首都</string>
<string name="poi_fee_no">不收費</string>
<string name="poi_email">電子郵件</string>
<string name="poi_fax">傳真</string>
<string name="poi_facebook">臉書</string>
<string name="poi_mobile">行動電話</string>
</resources>

View file

@ -9,6 +9,7 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
<string name="traffic_warning_hazard">Hazard</string>
<string name="rendering_value_boldOutline_name">Bold outline</string>
<string name="no_updates_available">No updates available</string>
<string name="download_live_updates">Live updates</string>

View file

@ -9,20 +9,23 @@ import net.osmand.plus.R;
public class AlarmInfo implements LocationPoint {
public enum AlarmInfoType {
SPEED_CAMERA(1),
SPEED_LIMIT(2),
BORDER_CONTROL(3),
RAILWAY(4),
TRAFFIC_CALMING(5),
TOLL_BOOTH(6),
STOP(7),
PEDESTRIAN(8),
MAXIMUM(9);
SPEED_CAMERA(1, R.string.traffic_warning_speed_camera),
SPEED_LIMIT(2, R.string.traffic_warning_speed_limit),
BORDER_CONTROL(3, R.string.traffic_warning_border_control),
RAILWAY(4, R.string.traffic_warning_railways),
TRAFFIC_CALMING(5, R.string.traffic_warning_calming),
TOLL_BOOTH(6, R.string.traffic_warning_payment),
STOP(7, R.string.traffic_warning_stop),
PEDESTRIAN(8, R.string.traffic_warning_pedestrian),
HAZARD(9, R.string.traffic_warning_hazard),
MAXIMUM(10, R.string.traffic_warning);
private int priority;
private int string;
private AlarmInfoType(int p) {
private AlarmInfoType(int p, int string) {
this.priority = p;
this.string = string;
}
public int getPriority(){
@ -31,25 +34,7 @@ public class AlarmInfo implements LocationPoint {
public String getVisualName(Context ctx) {
switch (priority) {
case 1:
return ctx.getString(R.string.traffic_warning_speed_camera);
case 2:
return ctx.getString(R.string.traffic_warning_speed_limit);
case 3:
return ctx.getString(R.string.traffic_warning_border_control);
case 4:
return ctx.getString(R.string.traffic_warning_railways);
case 5:
return ctx.getString(R.string.traffic_warning_calming);
case 6:
return ctx.getString(R.string.traffic_warning_payment);
case 7:
return ctx.getString(R.string.traffic_warning_stop);
case 8:
return ctx.getString(R.string.traffic_warning_pedestrian);
}
return ctx.getString(R.string.traffic_warning);
return ctx.getString(string);
}
}
@ -119,6 +104,8 @@ public class AlarmInfo implements LocationPoint {
}
} else if("traffic_calming".equals(ruleType.getTag())) {
alarmInfo = new AlarmInfo(AlarmInfoType.TRAFFIC_CALMING, locInd);
} else if("hazard".equals(ruleType.getTag())) {
alarmInfo = new AlarmInfo(AlarmInfoType.HAZARD, 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())){

View file

@ -833,6 +833,8 @@ public class RouteInfoWidgetsFactory {
locimgId = R.drawable.warnings_speed_camera;
} else if(alarm.getType() == AlarmInfoType.BORDER_CONTROL) {
locimgId = R.drawable.warnings_border_control;
} else if(alarm.getType() == AlarmInfoType.HAZARD) {
locimgId = R.drawable.warnings_hazard;
} else if(alarm.getType() == AlarmInfoType.TOLL_BOOTH) {
//image done by drawing red ring
} else if(alarm.getType() == AlarmInfoType.TRAFFIC_CALMING) {