aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/connector/gc/GCMap.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/connector/gc/GCMap.java')
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCMap.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/GCMap.java b/main/src/cgeo/geocaching/connector/gc/GCMap.java
index a8509b8..c71b859 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;
@@ -88,7 +88,7 @@ public class GCMap {
JSONObject typeObj = dataObject.getJSONObject("type");
cache.setType(CacheType.getByPattern(typeObj.getString("text"))); // Traditional Cache
JSONObject ownerObj = dataObject.getJSONObject("owner");
- cache.setOwner(ownerObj.getString("text"));
+ cache.setOwnerDisplayName(ownerObj.getString("text"));
result.addCache(cache);
@@ -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);
}