diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index daf5e35216..1e1eba6e22 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -9,6 +9,8 @@ 3. All your modified/created strings are in the top of the file (to make easier find what\'s translated). PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy --> + + Touring map view Audio Video Photo diff --git a/OsmAnd/src/net/osmand/plus/touringview/TouringViewPlugin.java b/OsmAnd/src/net/osmand/plus/touringview/TouringViewPlugin.java new file mode 100644 index 0000000000..a5fc55e83d --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/touringview/TouringViewPlugin.java @@ -0,0 +1,71 @@ +package net.osmand.plus.touringview; + +import net.osmand.IndexConstants; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandPlugin; +import net.osmand.plus.R; +import net.osmand.plus.download.DownloadActivity; +import net.osmand.plus.render.RendererRegistry; +import android.app.Activity; +import android.app.AlertDialog; +import android.app.AlertDialog.Builder; +import android.content.DialogInterface; +import android.content.DialogInterface.OnClickListener; +import android.content.Intent; + +public class NauticalMapsPlugin extends OsmandPlugin { + + public static final String ID = "touringView.plugin"; + public static final String COMPONENT = "net.osmand.touringviewPlugin"; + private static String previousRenderer = RendererRegistry.DEFAULT_RENDER; + private OsmandApplication app; + + + public NauticalMapsPlugin(OsmandApplication app) { + this.app = app; + } + + + @Override + public String getDescription() { + return "Activating this view changes the map style to \'Touring view\', this is a special high-detail view for travelers and professional drivers.\n\n" + + "This view provides, at any give map zoom, the maximum amount of travel details available in the map data (particularly roads, tracks, paths, and orientation marks), and clearly depicts all types of roads unambiguously by color coding, which is useful when e.g. driving large vehicles.\n\n" + + "A special map download is not needed, the view is created from our standard maps.\n\n" + + "This view can be reverted by either de-activating it again here, or by changing the \'Map style\' under \'Configure map\' as desired."; + } + + @Override + public String getName() { + return app.getString(net.osmand.plus.R.string.plugin_touring_view); + } + + @Override + public boolean init(final OsmandApplication app, final Activity activity) { + if(activity != null) { + // called from UI + previousRenderer = app.getSettings().RENDERER.get(); + app.getSettings().RENDERER.set(RendererRegistry.NAUTICAL_RENDER); + } + return true; + } + + @Override + public void disable(OsmandApplication app) { + super.disable(app); + if(app.getSettings().RENDERER.get().equals(RendererRegistry.NAUTICAL_RENDER)) { + app.getSettings().RENDERER.set(previousRenderer); + } + } + + + @Override + public String getId() { + return ID; + } + + + @Override + public Class getSettingsActivity() { + return null; + } +}