Use PointDescription#getLocationNamePlain instead of DecimalFormat

This commit is contained in:
alex 2018-01-26 18:58:45 +02:00
parent 255fdd5533
commit 6f96fa61ac

View file

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