aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index 0f3337c..7f02d24 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -135,12 +135,12 @@ public class CGeoMap extends AbstractMap implements ViewFactory {
private CgeoApplication app;
private MapItemFactory mapItemFactory;
private String mapTitle;
- private LeastRecentlyUsedSet<Geocache> caches;
+ final private LeastRecentlyUsedSet<Geocache> caches = new LeastRecentlyUsedSet<>(MAX_CACHES + DataStore.getAllCachesCount());
private MapViewImpl mapView;
private CachesOverlay overlayCaches;
private PositionAndScaleOverlay overlayPositionAndScale;
- final private GeoDirHandler geoDirUpdate;
+ final private GeoDirHandler geoDirUpdate = new UpdateLoc(this);
private SearchResult searchIntent = null;
private String geocodeIntent = null;
private Geopoint coordsIntent = null;
@@ -357,7 +357,6 @@ public class CGeoMap extends AbstractMap implements ViewFactory {
public CGeoMap(final MapActivityImpl activity) {
super(activity);
- geoDirUpdate = new UpdateLoc(this);
}
protected void countVisibleCaches() {
@@ -382,9 +381,6 @@ public class CGeoMap extends AbstractMap implements ViewFactory {
activity = this.getActivity();
app = (CgeoApplication) activity.getApplication();
- final int countBubbleCnt = DataStore.getAllCachesCount();
- caches = new LeastRecentlyUsedSet<>(MAX_CACHES + countBubbleCnt);
-
final MapProvider mapProvider = Settings.getMapProvider();
mapItemFactory = mapProvider.getMapItemFactory();