fix small usability issues

git-svn-id: https://osmand.googlecode.com/svn/trunk@283 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-07-05 08:24:36 +00:00
parent 92453b435c
commit ead4b86aab
10 changed files with 17 additions and 18 deletions

View file

@ -27,7 +27,6 @@ public class ToDoConstants {
// 66. Transport routing (show next stop, total distance, show stop get out).
// 43. Enable poi filter by name // 43. Enable poi filter by name
// 58. Upload/Download zip-index from site & unzip them on phone // 58. Upload/Download zip-index from site & unzip them on phone
// 45. Get clear <Use internet> settings. Move that setting on top settings screen. // 45. Get clear <Use internet> 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). // (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. // 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 (?) // 64. Traffic information (?)
// 65. Intermediate points (?) // 65. Intermediate points (?)
// 40. Support simple vector road rendering (require new index file) (?) // 40. Support simple vector road rendering (require new index file) (?)
@ -46,6 +46,7 @@ public class ToDoConstants {
// Download index show current index information // Download index show current index information
// Fix bugs with test data (bug with follow turn / left time / add turn) // Fix bugs with test data (bug with follow turn / left time / add turn)
// Fix description on android // Fix description on android
// Improvement : Show stops in the transport route
// TODO swing // TODO swing
// 9. Fix issues with big files (such as netherlands) - save memory (!) - very slow due to transport index ! // 9. Fix issues with big files (such as netherlands) - save memory (!) - very slow due to transport index !

View file

@ -363,7 +363,7 @@ public class IndexConstants {
} }
public enum IndexTransportRoute implements IndexColumn { 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; boolean index = false;
String type = null; String type = null;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 KiB

After

Width:  |  Height:  |  Size: 120 KiB

View file

@ -8,7 +8,7 @@
android:layout_width="100dp" android:layout_height="wrap_content" android:layout_gravity="bottom|right">></com.osmand.views.OsmZoomControls > android:layout_width="100dp" android:layout_height="wrap_content" android:layout_gravity="bottom|right">></com.osmand.views.OsmZoomControls >
<ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|left" android:id="@+id/BackToMenu" android:background="@drawable/back_menu"></ImageButton> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|left" android:id="@+id/BackToMenu" android:background="@drawable/back_menu"></ImageButton>
<ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top|right" android:layout_marginTop="32px" android:id="@+id/BackToLocation" android:background="@drawable/back_location"></ImageButton> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top|right" android:id="@+id/BackToLocation" android:background="@drawable/back_location"></ImageButton>
</FrameLayout> </FrameLayout>

View file

@ -72,7 +72,7 @@
<string name="get_directions">Маршрут</string> <string name="get_directions">Маршрут</string>
<string name="gps_status_app_not_found">Приложение Gps status не найдено</string> <string name="gps_status_app_not_found">Приложение Gps status не найдено</string>
<string name="show_gps_status">GPS статус</string> <string name="show_gps_status">GPS статус</string>
<string name="opening_hours">Рабочие часы : </string> <string name="opening_hours">Рабочие часы</string>
<string name="opening_changeset">Открытие пакета правок</string> <string name="opening_changeset">Открытие пакета правок</string>
<string name="closing_changeset">Закрытие пакета правок</string> <string name="closing_changeset">Закрытие пакета правок</string>
<string name="commiting_node">Сохранения объекта</string> <string name="commiting_node">Сохранения объекта</string>

View file

@ -72,7 +72,7 @@ See osmand.googlecode.com.</string>
<string name="get_directions">Directions</string> <string name="get_directions">Directions</string>
<string name="gps_status_app_not_found">Gps status app could not be found</string> <string name="gps_status_app_not_found">Gps status app could not be found</string>
<string name="show_gps_status">Show gps status</string> <string name="show_gps_status">Show gps status</string>
<string name="opening_hours">Opening hours : </string> <string name="opening_hours">Opening hours</string>
<string name="opening_changeset">Openging changeset</string> <string name="opening_changeset">Openging changeset</string>
<string name="closing_changeset">Closing changeset</string> <string name="closing_changeset">Closing changeset</string>
<string name="commiting_node">Commiting node</string> <string name="commiting_node">Commiting node</string>

View file

@ -57,8 +57,9 @@ import com.osmand.data.Amenity;
import com.osmand.data.AmenityType; import com.osmand.data.AmenityType;
import com.osmand.osm.Entity; import com.osmand.osm.Entity;
import com.osmand.osm.EntityInfo; import com.osmand.osm.EntityInfo;
import com.osmand.osm.MapUtils;
import com.osmand.osm.Node; 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.OSMSettings.OSMTagKey;
import com.osmand.osm.io.OsmBaseStorage; import com.osmand.osm.io.OsmBaseStorage;
import com.osmand.views.OsmandMapTileView; import com.osmand.views.OsmandMapTileView;
@ -551,14 +552,10 @@ public class EditingPOIActivity {
if(res != null){ if(res != null){
OsmBaseStorage st = new OsmBaseStorage(); OsmBaseStorage st = new OsmBaseStorage();
st.parseOSM(new ByteArrayInputStream(res.getBytes("UTF-8")), null, null, true); //$NON-NLS-1$ st.parseOSM(new ByteArrayInputStream(res.getBytes("UTF-8")), null, null, true); //$NON-NLS-1$
Entity entity = st.getRegisteredEntities().get(n.getId()); EntityId id = new Entity.EntityId(EntityType.NODE, n.getId());
entityInfo = st.getRegisteredEntityInfo().get(n.getId()); Node entity = (Node) st.getRegisteredEntities().get(id);
if(entity instanceof Node){ entityInfo = st.getRegisteredEntityInfo().get(id);
// check whether this is node (because id of node could be the same as relation) return entity;
if(MapUtils.getDistance(entity.getLatLon(), n.getLocation()) < 50){
return (Node) entity;
}
}
} }
} catch (IOException e) { } catch (IOException e) {

View file

@ -95,7 +95,7 @@ public class SearchPOIActivity extends ListActivity {
Amenity amenity = ((AmenityAdapter) getListAdapter()).getItem(pos); Amenity amenity = ((AmenityAdapter) getListAdapter()).getItem(pos);
String format = amenity.getSimpleFormat(OsmandSettings.usingEnglishNames(v.getContext())); String format = amenity.getSimpleFormat(OsmandSettings.usingEnglishNames(v.getContext()));
if (amenity.getOpeningHours() != null) { 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(); Toast.makeText(v.getContext(), format, Toast.LENGTH_LONG).show();
return true; return true;

View file

@ -101,7 +101,7 @@ public class POIMapLayer implements OsmandMapLayer {
if(n != null){ if(n != null){
String format = n.getSimpleFormat(OsmandSettings.usingEnglishNames(view.getContext())); String format = n.getSimpleFormat(OsmandSettings.usingEnglishNames(view.getContext()));
if(n.getOpeningHours() != null){ 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(); Toast.makeText(view.getContext(), format, Toast.LENGTH_SHORT).show();
return true; return true;

View file

@ -127,10 +127,11 @@ public class TransportStopsLayer implements OsmandMapLayer {
objects.clear(); objects.clear();
resourceManager.searchTransportAsync(topLatitude, leftLongitude, bottomLatitude, rightLongitude, view.getZoom(), objects); resourceManager.searchTransportAsync(topLatitude, leftLongitude, bottomLatitude, rightLongitude, view.getZoom(), objects);
int r = 3 * getRadiusPoi(view.getZoom()) / 4;
for (TransportStop o : objects) { for (TransportStop o : objects) {
int x = view.getMapXForPoint(o.getLocation().getLongitude()); int x = view.getMapXForPoint(o.getLocation().getLongitude());
int y = view.getMapYForPoint(o.getLocation().getLatitude()); 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);
} }
} }