diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java index cf89d319e5..72d9cf0f23 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java @@ -309,7 +309,9 @@ public class MenuBuilder { buildPlainMenuItems(view); } buildInternal(view); - buildCoordinatesRow(view); + if (needBuildCoordinatesRow()) { + buildCoordinatesRow(view); + } if (showOnlinePhotos) { buildNearestPhotosRow(view); } @@ -355,6 +357,10 @@ public class MenuBuilder { protected boolean needBuildPlainMenuItems() { return true; } + + protected boolean needBuildCoordinatesRow() { + return true; + } protected void buildPluginRows(View view) { for (OsmandPlugin plugin : menuPlugins) { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/MapDataMenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/MapDataMenuBuilder.java new file mode 100644 index 0000000000..531f6729d1 --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/MapDataMenuBuilder.java @@ -0,0 +1,17 @@ +package net.osmand.plus.mapcontextmenu.builders; + +import android.support.annotation.NonNull; +import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.mapcontextmenu.MenuBuilder; + +public class MapDataMenuBuilder extends MenuBuilder { + + public MapDataMenuBuilder(@NonNull MapActivity mapActivity) { + super(mapActivity); + } + + @Override + protected boolean needBuildCoordinatesRow() { + return false; + } +} diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java index 1290095be7..f216a847d8 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java @@ -28,8 +28,8 @@ import net.osmand.plus.download.IndexItem; import net.osmand.plus.helpers.FileNameTranslationHelper; import net.osmand.plus.inapp.InAppPurchaseHelper; import net.osmand.plus.liveupdates.LiveUpdatesHelper; -import net.osmand.plus.mapcontextmenu.MenuBuilder; import net.osmand.plus.mapcontextmenu.MenuController; +import net.osmand.plus.mapcontextmenu.builders.MapDataMenuBuilder; import net.osmand.plus.srtmplugin.SRTMPlugin; import net.osmand.plus.views.ContextMenuLayer.IContextMenuProvider; import net.osmand.plus.views.DownloadedRegionsLayer.DownloadMapObject; @@ -57,7 +57,7 @@ public class MapDataMenuController extends MenuController { private DownloadIndexesThread downloadThread; public MapDataMenuController(@NonNull MapActivity mapActivity, @NonNull PointDescription pointDescription, final @NonNull DownloadMapObject mapObject) { - super(new MenuBuilder(mapActivity), pointDescription, mapActivity); + super(new MapDataMenuBuilder(mapActivity), pointDescription, mapActivity); this.mapObject = mapObject; indexItem = mapObject.getIndexItem(); localIndexInfo = mapObject.getLocalIndexInfo();