From 9de628131b42aa4e1571535d24ef4ebdced1454a Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Wed, 5 Feb 2020 13:11:53 +0200 Subject: [PATCH] Fix #7979 --- OsmAnd-java/src/main/java/net/osmand/LocationConvert.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/LocationConvert.java b/OsmAnd-java/src/main/java/net/osmand/LocationConvert.java index 26f3d18a1f..0f4ec96883 100644 --- a/OsmAnd-java/src/main/java/net/osmand/LocationConvert.java +++ b/OsmAnd-java/src/main/java/net/osmand/LocationConvert.java @@ -200,19 +200,20 @@ public class LocationConvert { private static String formatDegrees(double coordinate, int outputType, StringBuilder sb) { if (outputType == FORMAT_DEGREES) { - sb.append(new DecimalFormat("##0.0000", new DecimalFormatSymbols(Locale.US)).format(coordinate)); + sb.append(new DecimalFormat("##0.00000", new DecimalFormatSymbols(Locale.US)).format(coordinate)); sb.append(DELIMITER_DEGREES); } else if (outputType == FORMAT_MINUTES) { coordinate = formatCoordinate(coordinate, sb, DELIMITER_DEGREES); sb.append(DELIMITER_SPACE); - sb.append(new DecimalFormat("##0.00", new DecimalFormatSymbols(Locale.US)).format(coordinate)); + sb.append(new DecimalFormat("00.000", new DecimalFormatSymbols(Locale.US)).format(coordinate)); sb.append(DELIMITER_MINUTES); } else if (outputType == FORMAT_SECONDS) { coordinate = formatCoordinate(coordinate, sb, DELIMITER_DEGREES); sb.append(DELIMITER_SPACE); coordinate = formatCoordinate(coordinate, sb, DELIMITER_MINUTES); sb.append(DELIMITER_SPACE); - formatCoordinate(coordinate, sb, DELIMITER_SECONDS); + sb.append(new DecimalFormat("00.0", new DecimalFormatSymbols(Locale.US)).format(coordinate)); + sb.append(DELIMITER_SECONDS); } return sb.toString(); }