diff options
| author | c:geo <cgeo@cgeo.org> | 2011-07-19 10:24:20 -0700 |
|---|---|---|
| committer | c:geo <cgeo@cgeo.org> | 2011-07-19 10:24:20 -0700 |
| commit | 33271246f4352d976faa5a9c44079c87e3f81ca4 (patch) | |
| tree | 5dda58ccc7cb9b38402540ac92082a5235f97672 /src | |
| parent | 648a57ff280a7f6513a5eacd73fbc1c8bfe7ed3c (diff) | |
| parent | 9795caed1c55ae9e886780f9c2711520d784c3c7 (diff) | |
| download | cgeo-33271246f4352d976faa5a9c44079c87e3f81ca4.zip cgeo-33271246f4352d976faa5a9c44079c87e3f81ca4.tar.gz cgeo-33271246f4352d976faa5a9c44079c87e3f81ca4.tar.bz2 | |
Merge pull request #14 from rsudev/mapsforge
Small fixes
Diffstat (limited to 'src')
| -rw-r--r-- | src/cgeo/geocaching/mapcommon/cgeomap.java | 4 | ||||
| -rw-r--r-- | src/cgeo/geocaching/mapsforge/mfMapView.java | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/cgeo/geocaching/mapcommon/cgeomap.java b/src/cgeo/geocaching/mapcommon/cgeomap.java index 0722981..a57d954 100644 --- a/src/cgeo/geocaching/mapcommon/cgeomap.java +++ b/src/cgeo/geocaching/mapcommon/cgeomap.java @@ -977,7 +977,7 @@ public class cgeomap extends MapBase { //2. fetch and draw(in another thread) and then insert into the db caches from geocaching.com - dont draw/insert if exist in memory? // stage 1 - pull and render from the DB only - if (settings.maplive == 0) { + if (!live || settings.maplive == 0) { searchId = app.getStoredInViewport(centerLat, centerLon, spanLat, spanLon, settings.cacheType); } else { searchId = app.getCachedInViewport(centerLat, centerLon, spanLat, spanLon, settings.cacheType); @@ -1022,7 +1022,7 @@ public class cgeomap extends MapBase { // stage 2 - pull and render from geocaching.com //this should just fetch and insert into the db _and_ be cancel-able if the viewport changes - if (settings.maplive >= 1) { + if (live && settings.maplive >= 1) { if (downloadThread != null && downloadThread.isWorking()) { downloadThread.stopIt(); } diff --git a/src/cgeo/geocaching/mapsforge/mfMapView.java b/src/cgeo/geocaching/mapsforge/mfMapView.java index e463a26..e2908a5 100644 --- a/src/cgeo/geocaching/mapsforge/mfMapView.java +++ b/src/cgeo/geocaching/mapsforge/mfMapView.java @@ -146,10 +146,7 @@ public class mfMapView extends MapView implements MapViewImpl { * @return true if the file is a valid map file, false otherwise. */ public static boolean isValidMapFile(String file) { - MapDatabase testDatabase = new MapDatabase(); - boolean isValid = testDatabase.openFile(file); - testDatabase.closeFile(); - return isValid; + return MapDatabase.isValidMapFile(file); } |
