diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2012-04-14 12:32:39 +0200 |
---|---|---|
committer | Samuel Tardieu <sam@rfc1149.net> | 2012-04-14 12:52:17 +0200 |
commit | 01700beb4d05b01502cdd46d80d2fc5beb3d458d (patch) | |
tree | d71f89808b95e6426c2463ecd2080e05a5dc22a4 /main/src/cgeo/geocaching/connector | |
parent | 82ee19f07fdc8c43ba6746eb1831309fea6c2f81 (diff) | |
download | cgeo-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.java | 7 |
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); } } } |