aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/connector
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-04-14 12:32:39 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-04-14 12:52:17 +0200
commit01700beb4d05b01502cdd46d80d2fc5beb3d458d (patch)
treed71f89808b95e6426c2463ecd2080e05a5dc22a4 /main/src/cgeo/geocaching/connector
parent82ee19f07fdc8c43ba6746eb1831309fea6c2f81 (diff)
downloadcgeo-01700beb4d05b01502cdd46d80d2fc5beb3d458d.zip
cgeo-01700beb4d05b01502cdd46d80d2fc5beb3d458d.tar.gz
cgeo-01700beb4d05b01502cdd46d80d2fc5beb3d458d.tar.bz2
Use Viewport instead of cooked-up list of Numbers
Diffstat (limited to 'main/src/cgeo/geocaching/connector')
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCBase.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/GCBase.java b/main/src/cgeo/geocaching/connector/gc/GCBase.java
index dc95793..99282c1 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCBase.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCBase.java
@@ -188,10 +188,9 @@ public class GCBase {
if ((lastSearchViewport == null) || !lastSearchViewport.contains(center)) {
SearchResult search = cgBase.searchByCoords(null, center, Settings.getCacheType(), false);
if (search != null && !search.isEmpty()) {
-
- List<Number> bounds = cgeoapplication.getInstance().getBounds(search.getGeocodes());
- lastSearchViewport = new Viewport(bounds.get(1).doubleValue(), bounds.get(2).doubleValue(), bounds.get(4).doubleValue(), bounds.get(3).doubleValue());
- searchResult.addGeocodes(search.getGeocodes());
+ final Set<String> geocodes = search.getGeocodes();
+ lastSearchViewport = cgeoapplication.getInstance().getBounds(geocodes);
+ searchResult.addGeocodes(geocodes);
}
}
}