diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2012-06-03 07:34:32 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2012-06-03 07:34:32 +0200 |
| commit | 133c78c84688c5cb6fe8ba5651e4815b6a0ff634 (patch) | |
| tree | 6681c2700da473a6d15b044a4de4d3b0e397903f /main/src/cgeo/geocaching/connector/gc/GCMap.java | |
| parent | fbf4086d126aeb3fd34bd0563891cbaf7704eac5 (diff) | |
| download | cgeo-133c78c84688c5cb6fe8ba5651e4815b6a0ff634.zip cgeo-133c78c84688c5cb6fe8ba5651e4815b6a0ff634.tar.gz cgeo-133c78c84688c5cb6fe8ba5651e4815b6a0ff634.tar.bz2 | |
refactoring: have more physical units code in one place
Diffstat (limited to 'main/src/cgeo/geocaching/connector/gc/GCMap.java')
| -rw-r--r-- | main/src/cgeo/geocaching/connector/gc/GCMap.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/GCMap.java b/main/src/cgeo/geocaching/connector/gc/GCMap.java index a8509b8..dd9193d 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCMap.java +++ b/main/src/cgeo/geocaching/connector/gc/GCMap.java @@ -10,7 +10,7 @@ import cgeo.geocaching.enumerations.LiveMapStrategy.Strategy; import cgeo.geocaching.enumerations.LiveMapStrategy.StrategyFlag; import cgeo.geocaching.enumerations.StatusCode; import cgeo.geocaching.geopoint.Geopoint; -import cgeo.geocaching.geopoint.IConversion; +import cgeo.geocaching.geopoint.Units; import cgeo.geocaching.geopoint.Viewport; import cgeo.geocaching.network.Parameters; import cgeo.geocaching.ui.Formatter; @@ -243,12 +243,7 @@ public class GCMap { SearchResult result = searchByViewport(viewport, tokens, strategy); if (Settings.isDebug()) { - String text = Formatter.SEPARATOR + strategy.getL10n() + Formatter.SEPARATOR; - if (Settings.isUseMetricUnits()) { - text += speed + " km/h"; - } else { - text += speed / IConversion.MILES_TO_KILOMETER + " mph"; - } + StringBuilder text = new StringBuilder(Formatter.SEPARATOR).append(strategy.getL10n()).append(Formatter.SEPARATOR).append(Units.getSpeed(speed)); result.setUrl(result.getUrl() + text); } |
