diff --git a/DataExtractionOSM/src/com/osmand/ToDoConstants.java b/DataExtractionOSM/src/com/osmand/ToDoConstants.java index c53201b0d8..b5e99a192e 100644 --- a/DataExtractionOSM/src/com/osmand/ToDoConstants.java +++ b/DataExtractionOSM/src/com/osmand/ToDoConstants.java @@ -25,9 +25,8 @@ public class ToDoConstants { // 61. Provide route information for YOURS (calclate turns/angle/expected time). // Fix some missing turns in CloudMade (for secondary roads wo name). Add them (if dist to prev/next turn > 150m) [dacha] - - // 66. Transport routing (show next stop, total distance, show stop get out). + // 43. Enable poi filter by name // 58. Upload/Download zip-index from site & unzip them on phone // 45. Get clear settings. Move that setting on top settings screen. @@ -35,6 +34,7 @@ public class ToDoConstants { // (would you like to use internet for that operation - if using internet is not checked). // Internet using now for : edit POI osm, show osm bugs layer, download tiles. + // 66. Transport routing (show next stop, total distance, show stop get out) (?). // 64. Traffic information (?) // 65. Intermediate points (?) // 40. Support simple vector road rendering (require new index file) (?) @@ -46,6 +46,7 @@ public class ToDoConstants { // Download index show current index information // Fix bugs with test data (bug with follow turn / left time / add turn) // Fix description on android + // Improvement : Show stops in the transport route // TODO swing // 9. Fix issues with big files (such as netherlands) - save memory (!) - very slow due to transport index ! diff --git a/DataExtractionOSM/src/com/osmand/data/index/IndexConstants.java b/DataExtractionOSM/src/com/osmand/data/index/IndexConstants.java index 58a6910dbe..bdba8f731a 100644 --- a/DataExtractionOSM/src/com/osmand/data/index/IndexConstants.java +++ b/DataExtractionOSM/src/com/osmand/data/index/IndexConstants.java @@ -363,7 +363,7 @@ public class IndexConstants { } public enum IndexTransportRoute implements IndexColumn { - ID("long", true), TYPE, OPERATOR, REF(null, true), NAME, NAME_EN, DIST("int"); //$NON-NLS-1$ //$NON-NLS-2$ + ID("long", true), TYPE(null, true), OPERATOR, REF(null, true), NAME, NAME_EN, DIST("int"); //$NON-NLS-1$ //$NON-NLS-2$ boolean index = false; String type = null; diff --git a/OsmAnd/res/drawable/background_rot.png b/OsmAnd/res/drawable/background_rot.png index 8a302464a3..7fc62a6b0e 100644 Binary files a/OsmAnd/res/drawable/background_rot.png and b/OsmAnd/res/drawable/background_rot.png differ diff --git a/OsmAnd/res/layout/main.xml b/OsmAnd/res/layout/main.xml index 7801fa3403..2ea9df1cac 100644 --- a/OsmAnd/res/layout/main.xml +++ b/OsmAnd/res/layout/main.xml @@ -8,7 +8,7 @@ android:layout_width="100dp" android:layout_height="wrap_content" android:layout_gravity="bottom|right">> - + diff --git a/OsmAnd/res/values-ru-rRU/strings.xml b/OsmAnd/res/values-ru-rRU/strings.xml index 5e6b9f558a..e65fce3c9b 100644 --- a/OsmAnd/res/values-ru-rRU/strings.xml +++ b/OsmAnd/res/values-ru-rRU/strings.xml @@ -72,7 +72,7 @@ Маршрут Приложение Gps status не найдено GPS статус - Рабочие часы : + Рабочие часы Открытие пакета правок Закрытие пакета правок Сохранения объекта diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index ba362988eb..f20a41e53d 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -72,7 +72,7 @@ See osmand.googlecode.com. Directions Gps status app could not be found Show gps status - Opening hours : + Opening hours Openging changeset Closing changeset Commiting node diff --git a/OsmAnd/src/com/osmand/activities/EditingPOIActivity.java b/OsmAnd/src/com/osmand/activities/EditingPOIActivity.java index ef44415f4a..de3e8639f1 100644 --- a/OsmAnd/src/com/osmand/activities/EditingPOIActivity.java +++ b/OsmAnd/src/com/osmand/activities/EditingPOIActivity.java @@ -57,8 +57,9 @@ import com.osmand.data.Amenity; import com.osmand.data.AmenityType; import com.osmand.osm.Entity; import com.osmand.osm.EntityInfo; -import com.osmand.osm.MapUtils; import com.osmand.osm.Node; +import com.osmand.osm.Entity.EntityId; +import com.osmand.osm.Entity.EntityType; import com.osmand.osm.OSMSettings.OSMTagKey; import com.osmand.osm.io.OsmBaseStorage; import com.osmand.views.OsmandMapTileView; @@ -551,14 +552,10 @@ public class EditingPOIActivity { if(res != null){ OsmBaseStorage st = new OsmBaseStorage(); st.parseOSM(new ByteArrayInputStream(res.getBytes("UTF-8")), null, null, true); //$NON-NLS-1$ - Entity entity = st.getRegisteredEntities().get(n.getId()); - entityInfo = st.getRegisteredEntityInfo().get(n.getId()); - if(entity instanceof Node){ - // check whether this is node (because id of node could be the same as relation) - if(MapUtils.getDistance(entity.getLatLon(), n.getLocation()) < 50){ - return (Node) entity; - } - } + EntityId id = new Entity.EntityId(EntityType.NODE, n.getId()); + Node entity = (Node) st.getRegisteredEntities().get(id); + entityInfo = st.getRegisteredEntityInfo().get(id); + return entity; } } catch (IOException e) { diff --git a/OsmAnd/src/com/osmand/activities/search/SearchPOIActivity.java b/OsmAnd/src/com/osmand/activities/search/SearchPOIActivity.java index adae759fd4..d1d01dce5d 100644 --- a/OsmAnd/src/com/osmand/activities/search/SearchPOIActivity.java +++ b/OsmAnd/src/com/osmand/activities/search/SearchPOIActivity.java @@ -95,7 +95,7 @@ public class SearchPOIActivity extends ListActivity { Amenity amenity = ((AmenityAdapter) getListAdapter()).getItem(pos); String format = amenity.getSimpleFormat(OsmandSettings.usingEnglishNames(v.getContext())); if (amenity.getOpeningHours() != null) { - format += "\n"+getString(R.id.OpeningHours) + amenity.getOpeningHours(); //$NON-NLS-1$ + format += "\n"+getString(R.string.opening_hours) + " : " + amenity.getOpeningHours(); //$NON-NLS-1$ //$NON-NLS-2$ } Toast.makeText(v.getContext(), format, Toast.LENGTH_LONG).show(); return true; diff --git a/OsmAnd/src/com/osmand/views/POIMapLayer.java b/OsmAnd/src/com/osmand/views/POIMapLayer.java index 9a66cae8e3..7fb9de4f1c 100644 --- a/OsmAnd/src/com/osmand/views/POIMapLayer.java +++ b/OsmAnd/src/com/osmand/views/POIMapLayer.java @@ -101,7 +101,7 @@ public class POIMapLayer implements OsmandMapLayer { if(n != null){ String format = n.getSimpleFormat(OsmandSettings.usingEnglishNames(view.getContext())); if(n.getOpeningHours() != null){ - format += "\n" + view.getContext().getString(R.string.opening_hours) + n.getOpeningHours(); //$NON-NLS-1$ + format += "\n" + view.getContext().getString(R.string.opening_hours) +" : "+ n.getOpeningHours(); //$NON-NLS-1$ //$NON-NLS-2$ } Toast.makeText(view.getContext(), format, Toast.LENGTH_SHORT).show(); return true; diff --git a/OsmAnd/src/com/osmand/views/TransportStopsLayer.java b/OsmAnd/src/com/osmand/views/TransportStopsLayer.java index 4aa81b3488..e6f2dfa915 100644 --- a/OsmAnd/src/com/osmand/views/TransportStopsLayer.java +++ b/OsmAnd/src/com/osmand/views/TransportStopsLayer.java @@ -127,10 +127,11 @@ public class TransportStopsLayer implements OsmandMapLayer { objects.clear(); resourceManager.searchTransportAsync(topLatitude, leftLongitude, bottomLatitude, rightLongitude, view.getZoom(), objects); + int r = 3 * getRadiusPoi(view.getZoom()) / 4; for (TransportStop o : objects) { int x = view.getMapXForPoint(o.getLocation().getLongitude()); int y = view.getMapYForPoint(o.getLocation().getLatitude()); - canvas.drawCircle(x, y, getRadiusPoi(view.getZoom()), pointAltUI); + canvas.drawRect(x - r, y - r, x + r, y + r, pointAltUI); } }