Change intermediate points dialog
This commit is contained in:
parent
cd0ea340a2
commit
d6bead7a70
4 changed files with 13 additions and 18 deletions
|
@ -10,7 +10,7 @@
|
|||
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="osmand_srtm_short_description_80_chars">OsmAnd plugin for offline contour lines</string>
|
||||
<string name="osmand_srtm_long_description_1000_chars">This plugin provides contour lines which can be displayed in OsmAnd\'s offline maps. The global data (between 70 degrees north and 70 degrees south) is based on measurements by SRTM (Shuttle Radar Topography Mission) and ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), an imaging instrument onboard Terra, the flagship satellite of NASA's Earth Observing System. ASTER is a cooperative effort between NASA, Japan's Ministry of Economy, Trade and Industry (METI), and Japan Space Systems (J-spacesystems).</string>
|
||||
<string name="osmand_srtm_long_description_1000_chars">This plugin provides contour lines which can be displayed in OsmAnd\'s offline maps. The global data (between 70 degrees north and 70 degrees south) is based on measurements by SRTM (Shuttle Radar Topography Mission) and ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), an imaging instrument onboard Terra, the flagship satellite of NASA\'s Earth Observing System. ASTER is a cooperative effort between NASA, Japan\'s Ministry of Economy, Trade and Industry (METI), and Japan Space Systems (J-spacesystems).</string>
|
||||
<string name="osmand_distance_plugin_description">Measure a distance between two and many points. Add points by a short click and remove by a long press.</string>
|
||||
<string name="osmand_distance_plugin_name">Distance calculator</string>
|
||||
<string name="use_clear_distance_measurement">Click one more time to clear measurement points.</string>
|
||||
|
|
|
@ -42,6 +42,7 @@ import net.osmand.plus.AsyncLoadingThread.TileLoadDownloadRequest;
|
|||
import net.osmand.plus.AsyncLoadingThread.TransportLoadRequest;
|
||||
import net.osmand.plus.render.MapRenderRepositories;
|
||||
import net.osmand.plus.render.NativeOsmandLibrary;
|
||||
import net.osmand.plus.srtmplugin.SRTMPlugin;
|
||||
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
|
||||
import net.osmand.render.RenderingRulesStorage;
|
||||
|
||||
|
@ -556,7 +557,9 @@ public class ResourceManager {
|
|||
long val = System.currentTimeMillis();
|
||||
ArrayList<File> files = new ArrayList<File>();
|
||||
collectFiles(context.getSettings().extendOsmandPath(MAPS_PATH), IndexConstants.BINARY_MAP_INDEX_EXT, files);
|
||||
collectFiles(context.getSettings().extendOsmandPath(SRTM_PATH), IndexConstants.BINARY_MAP_INDEX_EXT, files);
|
||||
if(OsmandPlugin.getEnabledPlugin(SRTMPlugin.class) != null) {
|
||||
collectFiles(context.getSettings().extendOsmandPath(SRTM_PATH), IndexConstants.BINARY_MAP_INDEX_EXT, files);
|
||||
}
|
||||
List<String> warnings = new ArrayList<String>();
|
||||
renderer.clearAllResources();
|
||||
CachedOsmandIndexes cachedOsmandIndexes = new CachedOsmandIndexes();
|
||||
|
|
|
@ -455,7 +455,9 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
|||
listWithAlternatives(settings.extendOsmandPath(ResourceManager.BACKUP_PATH),BINARY_MAP_INDEX_EXT, files);
|
||||
listWithAlternatives(settings.extendOsmandPath(ResourceManager.APP_DIR),BINARY_MAP_INDEX_EXT, files);
|
||||
listWithAlternatives(settings.extendOsmandPath(ResourceManager.APP_DIR),EXTRA_EXT, files);
|
||||
listWithAlternatives(settings.extendOsmandPath(ResourceManager.SRTM_PATH),BINARY_MAP_INDEX_EXT, files);
|
||||
if(OsmandPlugin.getEnabledPlugin(SRTMPlugin.class) != null) {
|
||||
listWithAlternatives(settings.extendOsmandPath(ResourceManager.SRTM_PATH),BINARY_MAP_INDEX_EXT, files);
|
||||
}
|
||||
listWithAlternatives(settings.extendOsmandPath(ResourceManager.VOICE_PATH),"", files);
|
||||
listWithAlternatives(settings.extendOsmandPath(ResourceManager.VOICE_PATH),"", files);
|
||||
return files;
|
||||
|
|
|
@ -807,15 +807,9 @@ public class MapActivityActions implements DialogProvider {
|
|||
Builder builder = new AlertDialog.Builder(mapActivity);
|
||||
|
||||
adapter.registerItem(R.string.context_menu_item_navigate_point, R.drawable.list_view_set_destination);
|
||||
adapter.registerItem(R.string.context_menu_item_directions, R.drawable.list_activities_directions_to_here);
|
||||
final TargetPointsHelper targets = mapActivity.getTargetPoints();
|
||||
if(targets.getPointToNavigate() != null) {
|
||||
if(targets.getIntermediatePoints().size() == 0) {
|
||||
adapter.registerItem(R.string.context_menu_item_intermediate_point, R.drawable.list_view_set_intermediate);
|
||||
} else {
|
||||
adapter.registerItem(R.string.context_menu_item_first_intermediate_point, R.drawable.list_view_set_intermediate);
|
||||
adapter.registerItem(R.string.context_menu_item_last_intermediate_point, R.drawable.list_view_set_intermediate);
|
||||
}
|
||||
adapter.registerItem(R.string.context_menu_item_intermediate_point, R.drawable.list_view_set_intermediate);
|
||||
}
|
||||
adapter.registerItem(R.string.context_menu_item_show_route, R.drawable.list_view_show_route_from_here);
|
||||
adapter.registerItem(R.string.context_menu_item_search, R.drawable.list_view_search_near_here);
|
||||
|
@ -865,9 +859,10 @@ public class MapActivityActions implements DialogProvider {
|
|||
} else if (standardId == R.string.context_menu_item_navigate_point) {
|
||||
mapActivity.getTargetPoints().navigateToPoint(mapActivity,
|
||||
new LatLon(latitude, longitude), true, -1);
|
||||
} else if (standardId == R.string.context_menu_item_directions) {
|
||||
// always enable and follow and let calculate it (GPS is not accessible in garage)
|
||||
getDirections(null, new LatLon(latitude, longitude), true);
|
||||
if(!routingHelper.isRouteBeingCalculated() && !routingHelper.isRouteCalculated() ) {
|
||||
getDirections(null, new LatLon(latitude, longitude), true);
|
||||
}
|
||||
} else if (standardId == R.string.context_menu_item_show_route) {
|
||||
if (targets.checkPointToNavigate(mapActivity)) {
|
||||
Location loc = new Location("map");
|
||||
|
@ -878,12 +873,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
} else if (standardId == R.string.context_menu_item_intermediate_point) {
|
||||
targets.navigateToPoint(mapActivity,
|
||||
new LatLon(latitude, longitude), true, targets.getIntermediatePoints().size());
|
||||
} else if (standardId == R.string.context_menu_item_first_intermediate_point) {
|
||||
targets.navigateToPoint(mapActivity,
|
||||
new LatLon(latitude, longitude), true, 0);
|
||||
} else if (standardId == R.string.context_menu_item_last_intermediate_point) {
|
||||
targets.navigateToPoint(mapActivity,
|
||||
new LatLon(latitude, longitude), true, targets.getIntermediatePoints().size());
|
||||
IntermediatePointsDialog.openIntermediatePointsDialog(mapActivity);
|
||||
} else if (standardId == R.string.context_menu_item_share_location) {
|
||||
shareLocation(latitude, longitude, mapActivity.getMapView().getZoom());
|
||||
} else if (standardId == R.string.context_menu_item_add_favorite) {
|
||||
|
|
Loading…
Reference in a new issue