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.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/GCMap.java b/main/src/cgeo/geocaching/connector/gc/GCMap.java
index 4fdde56..d76a987 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCMap.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCMap.java
@@ -1,9 +1,9 @@
package cgeo.geocaching.connector.gc;
+import cgeo.geocaching.DataStore;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.cgData;
-import cgeo.geocaching.cgeoapplication;
+import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.enumerations.CacheSize;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.LiveMapStrategy.Strategy;
@@ -236,7 +236,9 @@ public class GCMap {
}
Log.d("Retrieved " + searchResult.getCount() + " caches for tile " + tile.toString());
- } catch (Exception e) {
+ } catch (RuntimeException e) {
+ Log.e("GCMap.parseMapJSON", e);
+ } catch (JSONException e) {
Log.e("GCMap.parseMapJSON", e);
}
@@ -253,7 +255,7 @@ public class GCMap {
* @return
*/
public static SearchResult searchByViewport(final Viewport viewport, final String[] tokens) {
- int speed = (int) cgeoapplication.getInstance().currentGeo().getSpeed() * 60 * 60 / 1000; // in km/h
+ int speed = (int) CgeoApplication.getInstance().currentGeo().getSpeed() * 60 * 60 / 1000; // in km/h
Strategy strategy = Settings.getLiveMapStrategy();
if (strategy == Strategy.AUTO) {
strategy = speed >= 30 ? Strategy.FAST : Strategy.DETAILED;
@@ -359,7 +361,7 @@ public class GCMap {
// Check for vanished found caches
if (tiles.iterator().next().getZoomLevel() >= Tile.ZOOMLEVEL_MIN_PERSONALIZED) {
- searchResult.addFilteredGeocodes(cgData.getCachedMissingFromSearch(searchResult, tiles, GCConnector.getInstance(), Tile.ZOOMLEVEL_MIN_PERSONALIZED - 1));
+ searchResult.addFilteredGeocodes(DataStore.getCachedMissingFromSearch(searchResult, tiles, GCConnector.getInstance(), Tile.ZOOMLEVEL_MIN_PERSONALIZED - 1));
}
}
@@ -370,7 +372,7 @@ public class GCMap {
SearchResult search = GCParser.searchByCoords(center, Settings.getCacheType(), false, null);
if (search != null && !search.isEmpty()) {
final Set<String> geocodes = search.getGeocodes();
- lastSearchViewport = cgData.getBounds(geocodes);
+ lastSearchViewport = DataStore.getBounds(geocodes);
searchResult.addGeocodes(geocodes);
}
}