From 47ee7899d1a359cfc3821f8f4dcf3eb985b4d18c Mon Sep 17 00:00:00 2001 From: sonora Date: Tue, 23 May 2017 22:30:28 +0200 Subject: [PATCH] Show coordinates only in selected format (Fixes #3708) --- .../net/osmand/plus/mapcontextmenu/MenuController.java | 6 +++--- .../plus/mapcontextmenu/builders/AmenityMenuBuilder.java | 8 ++++---- .../src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java index a95c7d788e..ee9ed33d97 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java @@ -221,9 +221,9 @@ public abstract class MenuController extends BaseMenuController { OsmandSettings st = ((OsmandApplication) getMapActivity().getApplicationContext()).getSettings(); addPlainMenuItem(R.drawable.ic_action_get_my_location, PointDescription.getLocationName(getMapActivity(), latLon.getLatitude(), latLon.getLongitude(), true).replaceAll("\n", " "), false, false, null); - if (st.COORDINATES_FORMAT.get() != PointDescription.OLC_FORMAT) - addPlainMenuItem(R.drawable.ic_action_get_my_location, PointDescription.getLocationOlcName( - latLon.getLatitude(), latLon.getLongitude()).replaceAll("\n", " "), false, false, null); + //if (st.COORDINATES_FORMAT.get() != PointDescription.OLC_FORMAT) + // addPlainMenuItem(R.drawable.ic_action_get_my_location, PointDescription.getLocationOlcName( + // latLon.getLatitude(), latLon.getLongitude()).replaceAll("\n", " "), false, false, null); } public PointDescription getPointDescription() { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java index da3c41e835..8577a0fc09 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java @@ -493,10 +493,10 @@ public class AmenityMenuBuilder extends MenuBuilder { buildRow(view, R.drawable.ic_action_get_my_location, PointDescription.getLocationName(app, amenity.getLocation().getLatitude(), amenity.getLocation().getLongitude(), true) .replaceAll("\n", " "), 0, false, null, false, 0, false, null); - if (st.COORDINATES_FORMAT.get() != PointDescription.OLC_FORMAT) - buildRow(view, R.drawable.ic_action_get_my_location, PointDescription.getLocationOlcName( - amenity.getLocation().getLatitude(), amenity.getLocation().getLongitude()) - .replaceAll("\n", " "), 0, false, null, false, 0, false, null); + //if (st.COORDINATES_FORMAT.get() != PointDescription.OLC_FORMAT) + // buildRow(view, R.drawable.ic_action_get_my_location, PointDescription.getLocationOlcName( + // amenity.getLocation().getLatitude(), amenity.getLocation().getLongitude()) + // .replaceAll("\n", " "), 0, false, null, false, 0, false, null); } diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java index 7e59c56854..38ad952a7b 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java @@ -78,9 +78,9 @@ public class EditPOIMenuBuilder extends MenuBuilder { buildRow(view, R.drawable.ic_action_get_my_location, PointDescription.getLocationName(app, osmPoint.getLatitude(), osmPoint.getLongitude(), true) .replaceAll("\n", " "), 0, false, null, false, 0, false, null); - if (st.COORDINATES_FORMAT.get() != PointDescription.OLC_FORMAT) - buildRow(view, R.drawable.ic_action_get_my_location, PointDescription.getLocationOlcName( - osmPoint.getLatitude(), osmPoint.getLongitude()) - .replaceAll("\n", " "), 0, false, null, false, 0, false, null); + //if (st.COORDINATES_FORMAT.get() != PointDescription.OLC_FORMAT) + // buildRow(view, R.drawable.ic_action_get_my_location, PointDescription.getLocationOlcName( + // osmPoint.getLatitude(), osmPoint.getLongitude()) + // .replaceAll("\n", " "), 0, false, null, false, 0, false, null); } }