diff options
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); } } } |