fix issue 174

git-svn-id: https://osmand.googlecode.com/svn/trunk@690 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-11-23 10:23:12 +00:00
parent 8720151e52
commit 2f56b515b3
4 changed files with 28 additions and 22 deletions

View file

@ -1,22 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android="http://schemas.android.com/apk/res/android">
<group android:id="@+id/map_context_menu" android:menuCategory="container">
<item android:title="@string/where_am_i" android:id="@+id/map_where_am_i" android:icon="@android:drawable/ic_menu_mylocation"></item>
<item android:id="@+id/map_layers" android:title="@string/menu_layers" android:icon="@android:drawable/ic_menu_mapmode"></item>
<item android:id="@+id/map_show_settings" android:title="@string/settings_Button" android:icon="@android:drawable/ic_menu_preferences"></item>
<!-- not visible by default -->
<item android:id="@+id/map_navigate_to_point" android:title="@string/stop_navigation" android:visible="false" android:icon="@android:drawable/ic_menu_close_clear_cancel"></item>
<item android:id="@+id/map_mute" android:title="@string/menu_mute_off" android:visible="false"></item>
<item android:id="@+id/map_get_directions" android:title="@string/get_directions" android:icon="@android:drawable/ic_menu_directions"></item>
<item android:title="@string/map_specify_point" android:id="@+id/map_specify_point" android:icon="@android:drawable/ic_menu_search"></item>
<item android:title="@string/show_gps_status" android:id="@+id/map_show_gps_status" android:icon="@android:drawable/ic_menu_compass"></item>
<item android:title="@string/map_route_by_gpx" android:id="@+id/map_gpx_routing"></item>
</group>
</menu>
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android="http://schemas.android.com/apk/res/android">
<group android:id="@+id/map_context_menu" android:menuCategory="container">
<item android:title="@string/where_am_i" android:id="@+id/map_where_am_i" android:icon="@android:drawable/ic_menu_mylocation"></item>
<item android:id="@+id/map_layers" android:title="@string/menu_layers" android:icon="@android:drawable/ic_menu_mapmode"></item>
<item android:id="@+id/map_show_settings" android:title="@string/settings_Button" android:icon="@android:drawable/ic_menu_preferences"></item>
<!-- not visible by default -->
<item android:id="@+id/map_navigate_to_point" android:title="@string/stop_navigation" android:visible="false" android:icon="@android:drawable/ic_menu_close_clear_cancel"></item>
<item android:id="@+id/map_mute" android:title="@string/menu_mute_off" android:visible="false"></item>
<item android:id="@+id/map_get_directions" android:title="@string/get_directions" android:icon="@android:drawable/ic_menu_directions"></item>
<item android:title="@string/map_specify_point" android:id="@+id/map_specify_point" android:icon="@android:drawable/ic_menu_search"></item>
<item android:title="@string/show_gps_status" android:id="@+id/map_show_gps_status" android:icon="@android:drawable/ic_menu_compass"></item>
<item android:title="@string/map_route_by_gpx" android:id="@+id/map_gpx_routing"></item>
<item android:id="@+id/map_show_point_options" android:title="@string/show_point_options"></item>
</group>
</menu>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="show_point_options">Контекстное меню</string>
<string name="renderer_load_sucess">Стиль успешно загружен</string>
<string name="renderer_load_exception">Произошла ошибка во время загрузки данного стиля</string>
<string name="renderers">Рендеринг карты</string>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resources>
<string name="show_point_options">Point options</string>
<string name="renderer_load_sucess">Renderer was sucessfully loaded</string>
<string name="renderer_load_exception">Exception occured: renderer was not loaded</string>
<string name="renderers">Vector renderer</string>

View file

@ -1012,6 +1012,9 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
} else if (item.getItemId() == R.id.map_gpx_routing) {
useGPXFileLayer(true, navigationLayer.getPointToNavigate());
return true;
} else if (item.getItemId() == R.id.map_show_point_options) {
contextMenuPoint(mapView.getLatitude(), mapView.getLongitude());
return true;
}
return super.onOptionsItemSelected(item);
}