diff --git a/DataExtractionOSM/src/net/osmand/osm/MapRenderingTypes.java b/DataExtractionOSM/src/net/osmand/osm/MapRenderingTypes.java index c97dd162d6..b45a995624 100644 --- a/DataExtractionOSM/src/net/osmand/osm/MapRenderingTypes.java +++ b/DataExtractionOSM/src/net/osmand/osm/MapRenderingTypes.java @@ -12,6 +12,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.TreeMap; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; @@ -218,7 +219,7 @@ public class MapRenderingTypes { for(MapRulType type : types.values()){ if(type.poiCategory != null && type.targetTagValue == null) { if(!amenityTypeNameToTagVal.containsKey(type.poiCategory)) { - amenityTypeNameToTagVal.put(type.poiCategory, new LinkedHashMap()); + amenityTypeNameToTagVal.put(type.poiCategory, new TreeMap()); } String name = type.value; if (name != null) { diff --git a/DataExtractionOSM/src/net/osmand/render/default.render.xml b/DataExtractionOSM/src/net/osmand/render/default.render.xml index e567e30a07..2e8b5ece4e 100644 --- a/DataExtractionOSM/src/net/osmand/render/default.render.xml +++ b/DataExtractionOSM/src/net/osmand/render/default.render.xml @@ -216,7 +216,8 @@ - + + @@ -1016,6 +1017,7 @@ + diff --git a/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java b/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java index 3b9595d477..45389458bd 100644 --- a/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java +++ b/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java @@ -90,7 +90,9 @@ public class OsmExtractionUI implements IMapLocationListener { if(!(e instanceof ThreadDeath)){ ExceptionHandler.handle("Error in thread " + t.getName(), e); //$NON-NLS-1$ } - defaultHandler.uncaughtException(t, e); + if(defaultHandler != null){ + defaultHandler.uncaughtException(t, e); + } } }); diff --git a/OsmAnd/res/drawable-hdpi/headline_close_button.png b/OsmAnd/res/drawable-hdpi/headline_close_button.png index 50e3d030f4..99fe44d45e 100644 Binary files a/OsmAnd/res/drawable-hdpi/headline_close_button.png and b/OsmAnd/res/drawable-hdpi/headline_close_button.png differ diff --git a/OsmAnd/res/drawable-hdpi/headline_close_button_pressed.png b/OsmAnd/res/drawable-hdpi/headline_close_button_pressed.png index 3bcf4c4677..a459359baa 100644 Binary files a/OsmAnd/res/drawable-hdpi/headline_close_button_pressed.png and b/OsmAnd/res/drawable-hdpi/headline_close_button_pressed.png differ diff --git a/OsmAnd/res/drawable-large/headline_close_button.png b/OsmAnd/res/drawable-large/headline_close_button.png index 50e3d030f4..99fe44d45e 100644 Binary files a/OsmAnd/res/drawable-large/headline_close_button.png and b/OsmAnd/res/drawable-large/headline_close_button.png differ diff --git a/OsmAnd/res/drawable-large/headline_close_button_pressed.png b/OsmAnd/res/drawable-large/headline_close_button_pressed.png index 3bcf4c4677..a459359baa 100644 Binary files a/OsmAnd/res/drawable-large/headline_close_button_pressed.png and b/OsmAnd/res/drawable-large/headline_close_button_pressed.png differ diff --git a/OsmAnd/res/drawable-mdpi/headline_close_button.png b/OsmAnd/res/drawable-mdpi/headline_close_button.png index 562eb6ef57..89aab11a00 100644 Binary files a/OsmAnd/res/drawable-mdpi/headline_close_button.png and b/OsmAnd/res/drawable-mdpi/headline_close_button.png differ diff --git a/OsmAnd/res/drawable-mdpi/headline_close_button_pressed.png b/OsmAnd/res/drawable-mdpi/headline_close_button_pressed.png index 50d936409b..5ca5cc799f 100644 Binary files a/OsmAnd/res/drawable-mdpi/headline_close_button_pressed.png and b/OsmAnd/res/drawable-mdpi/headline_close_button_pressed.png differ diff --git a/OsmAnd/res/layout/local_openstreetmap_list_item_category.xml b/OsmAnd/res/layout/local_openstreetmap_list_item_category.xml index 3fd387b730..9a3d72a183 100644 --- a/OsmAnd/res/layout/local_openstreetmap_list_item_category.xml +++ b/OsmAnd/res/layout/local_openstreetmap_list_item_category.xml @@ -4,6 +4,7 @@ android:background="@drawable/tab_menu_item_small"> () { + + @Override + public int compare(String object1, String object2) { + String v1 = SpecialPhrases.getSpecialPhrase(object1).replace('_', ' '); + String v2 = SpecialPhrases.getSpecialPhrase(object2).replace('_', ' '); + return cl.compare(v1, v2); + } + }); + final String[] visibleNames = new String[array.length]; final boolean[] selected = new boolean[array.length]; - for (int i = 0; i < selected.length; i++) { + + for (int i = 0; i < array.length; i++) { + visibleNames[i] = SpecialPhrases.getSpecialPhrase(array[i]).replace('_', ' '); if (acceptedCategories == null) { selected[i] = true; } else { @@ -239,7 +257,7 @@ public class EditPOIFilterActivity extends OsmandListActivity { } }); - builder.setMultiChoiceItems(array, selected, new DialogInterface.OnMultiChoiceClickListener() { + builder.setMultiChoiceItems(visibleNames, selected, new DialogInterface.OnMultiChoiceClickListener() { @Override public void onClick(DialogInterface dialog, int item, boolean isChecked) { diff --git a/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java b/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java index a218ec40e5..c6a3c416e0 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java @@ -4,7 +4,6 @@ import java.io.File; import java.text.MessageFormat; import java.util.Random; -import net.osmand.AndroidUtils; import net.osmand.Version; import net.osmand.access.AccessibleAlertBuilder; import net.osmand.plus.OsmandApplication; @@ -223,8 +222,6 @@ public class MainMenuActivity extends Activity { } } }); - AndroidUtils.expandClickableArea(closeButton, 1,1,3,3); - View searchButton = window.findViewById(R.id.SearchButton); searchButton.setOnClickListener(new OnClickListener() { @Override diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditingPOIActivity.java b/OsmAnd/src/net/osmand/plus/osmedit/EditingPOIActivity.java index 65c6b7c18e..48b1109681 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditingPOIActivity.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditingPOIActivity.java @@ -353,7 +353,7 @@ public class EditingPOIActivity implements DialogProvider { } }); } - v.invalidate(); + layout.requestLayout(); } }); diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index 5e2abce3c1..f712deccff 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -451,6 +451,7 @@ public class RouteProvider { RouteDirectionInfo last = directions.get(directions.size() - 1); // update speed using time and idstance last.setAverageSpeed((distanceToEnd[last.routePointOffset] - distanceToEnd[offset])/last.getAverageSpeed()); + last.distance = (int) (distanceToEnd[last.routePointOffset] - distanceToEnd[offset]); } // save time as a speed because we don't know distance of the route segment float avgSpeed = time; diff --git a/Osmand-kernel/osmand/src/multipolygons.cpp b/Osmand-kernel/osmand/src/multipolygons.cpp index f7b63ceb7f..377839fa25 100644 --- a/Osmand-kernel/osmand/src/multipolygons.cpp +++ b/Osmand-kernel/osmand/src/multipolygons.cpp @@ -57,6 +57,13 @@ bool processCoastlines(std::vector& coastLines, int leftX, int o->types.push_back(tag_value("natural", "coastline_broken")); res.push_back(o); } + // draw completed for debug purpose + for (int i = 0; i < completedRings.size(); i++) { + MapDataObject* o = new MapDataObject(); + o->points = completedRings[i]; + o->types.push_back(tag_value("natural", "coastline_line")); + res.push_back(o); + } } if (!showIfThereIncompleted && uncompletedRings.size() > 0) {