From 33b4034c16bbfbe05cf425cb07b7a93aea11a0df Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 9 Mar 2016 08:56:18 -0500 Subject: [PATCH] Disable fixme it looks wrong fix (rounddist is measured in meters) --- .../src/net/osmand/binary/BinaryInspector.java | 2 +- .../src/net/osmand/plus/OsmAndFormatter.java | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java index eb3c702fb9..3fbd7b3f90 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java @@ -76,7 +76,7 @@ public class BinaryInspector { // "-vstats", // "/Users/victorshcherb/osmand/maps/Synthetic_test_rendering.obf" // "/Users/victorshcherb/osmand/maps/Netherlands_europe_2.road.obf" - "/Users/victorshcherb/osmand/maps/Map.obf" + "/Users/victorshcherb/osmand/maps/C_11_03_06.obf" }); } else { in.inspector(args); diff --git a/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java b/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java index c45910c2b4..9493fc78a2 100644 --- a/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java +++ b/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java @@ -68,13 +68,13 @@ public class OsmAndFormatter { } //Miles exceptions //FIXME (conversions missing) - if (mc == MetricsConstants.MILES_AND_FOOTS && point == 1 / metersInSecondUnit && roundDist == 2000) { - roundDist = 0.5f; - } else if (mc == MetricsConstants.MILES_AND_YARDS && point == 1 / metersInSecondUnit && roundDist == 1000) { - roundDist = 0.5f; - } else if (mc == MetricsConstants.MILES_AND_YARDS && point == 1 / metersInSecondUnit && roundDist == 500) { - roundDist = 0.25f; - } +// if (mc == MetricsConstants.MILES_AND_FOOTS && point == 1 / metersInSecondUnit && roundDist == 2000) { +// roundDist = 0.5f; +// } else if (mc == MetricsConstants.MILES_AND_YARDS && point == 1 / metersInSecondUnit && roundDist == 1000) { +// roundDist = 0.5f; +// } else if (mc == MetricsConstants.MILES_AND_YARDS && point == 1 / metersInSecondUnit && roundDist == 500) { +// roundDist = 0.25f; +// } return roundDist; } @@ -113,9 +113,9 @@ public class OsmAndFormatter { } else if (meters > 0.999f * mainUnitInMeters) { return MessageFormat.format("{0,number,#.##} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters).replace('\n', ' '); //$NON-NLS-1$ } else if (mc == MetricsConstants.MILES_AND_FOOTS && meters > 0.249f * mainUnitInMeters) { - return MessageFormat.format("{0,number,#.##} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters).replace('\n', ' '); //$NON-NLS-1$ + return MessageFormat.format("{0,number,#.##} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters).replace('\n', ' '); //$NON-NLS-1$ } else if (mc == MetricsConstants.MILES_AND_YARDS && meters > 0.249f * mainUnitInMeters) { - return MessageFormat.format("{0,number,#.##} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters).replace('\n', ' '); //$NON-NLS-1$ + return MessageFormat.format("{0,number,#.##} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters).replace('\n', ' '); //$NON-NLS-1$ } else if (mc == MetricsConstants.NAUTICAL_MILES && meters > 0.09f * mainUnitInMeters) { return MessageFormat.format("{0,number,#.##} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters).replace('\n', ' '); //$NON-NLS-1$ } else {