From 6f96fa61ac7097ca53d9f01bb0dc5af3868fa823 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 26 Jan 2018 18:58:45 +0200 Subject: [PATCH] Use PointDescription#getLocationNamePlain instead of DecimalFormat --- OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index 97b463d1c0..ce7f5efdef 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -46,6 +46,7 @@ import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.ValueHolder; import net.osmand.data.LatLon; +import net.osmand.data.PointDescription; import net.osmand.plus.ApplicationMode; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuAdapter.OnRowItemClick; @@ -93,7 +94,6 @@ import net.osmand.plus.views.controls.SwipeDismissListViewTouchListener.Undoable import net.osmand.plus.views.mapwidgets.MapWidgetRegistry; import java.lang.ref.WeakReference; -import java.text.DecimalFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -1516,9 +1516,8 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis start.start = false; start.intermediate = startInd != allTargets.size() - 1; if (targetPointsHelper.getPointToStart() == null) { - DecimalFormat format = new DecimalFormat("#.#####"); - start.getOriginalPointDescription().setName(format.format(start.getLatitude()) - + ", " + format.format(start.getLongitude())); + start.getOriginalPointDescription().setName(PointDescription + .getLocationNamePlain(getMyApplication(), start.getLatitude(), start.getLongitude())); } first.start = true; first.intermediate = false;