Show coordinates only in selected format (Fixes #3708)

This commit is contained in:
sonora 2017-05-23 22:30:28 +02:00 committed by Alexey Kulish
parent e8a0763ef6
commit 83d6a35e60
3 changed files with 11 additions and 11 deletions

View file

@ -211,9 +211,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() {

View file

@ -486,10 +486,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);
}

View file

@ -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);
}
}