Let's not mix unit systems

In the US, "miles and meters" is a no-go, almost like a "vegetarian steakhouse" ... :)
I am surprised we have requests from the UK to mix 2 different measurement systems, and I have left this as default for the UK, although I am not sure this really makes sense other than documenting how 2 different systems got mixed up in our everyday lives :)
This commit is contained in:
sonora 2016-08-18 20:37:13 +02:00
parent 03f61c55bb
commit cb5aa0dee3
2 changed files with 3 additions and 3 deletions

View file

@ -2882,8 +2882,8 @@ public class OsmandSettings {
public enum MetricsConstants {
KILOMETERS_AND_METERS(R.string.si_km_m, "km-m"),
MILES_AND_METERS(R.string.si_mi_meters, "mi-m"),
MILES_AND_FOOTS(R.string.si_mi_foots, "mi-f"),
MILES_AND_METERS(R.string.si_mi_meters, "mi-m"),
NAUTICAL_MILES(R.string.si_nm, "nm"),
MILES_AND_YARDS(R.string.si_mi_yard, "mi-y");
@ -2929,7 +2929,7 @@ public class OsmandSettings {
public enum DrivingRegion {
EUROPE_ASIA(R.string.driving_region_europe_asia, MetricsConstants.KILOMETERS_AND_METERS, false, false),
US(R.string.driving_region_us, MetricsConstants.MILES_AND_METERS, false, true),
US(R.string.driving_region_us, MetricsConstants.MILES_AND_FOOTS, false, true),
CANADA(R.string.driving_region_canada, MetricsConstants.KILOMETERS_AND_METERS, false, true),
UK_AND_OTHERS(R.string.driving_region_uk, MetricsConstants.MILES_AND_METERS, true, false),
JAPAN(R.string.driving_region_japan, MetricsConstants.KILOMETERS_AND_METERS, true, false);

View file

@ -165,7 +165,7 @@ public class DownloadIndexesThread {
boolean americanSigns = "american".equals(params.getRegionRoadSigns());
boolean leftHand = "yes".equals(params.getRegionLeftHandDriving());
MetricsConstants mc = "miles".equals(params.getRegionMetric()) ?
MetricsConstants.MILES_AND_METERS : MetricsConstants.KILOMETERS_AND_METERS;
MetricsConstants.MILES_AND_FOOTS : MetricsConstants.KILOMETERS_AND_METERS;
for (DrivingRegion r : DrivingRegion.values()) {
if (r.americanSigns == americanSigns && r.leftHandDriving == leftHand &&
r.defMetrics == mc) {