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 | |
| 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
| -rw-r--r-- | res/layout/googlemap.xml | 2 | ||||
| -rw-r--r-- | res/layout/mfmap.xml | 2 | ||||
| -rw-r--r-- | src/cgeo/geocaching/mapcommon/cgeomap.java | 4 | ||||
| -rw-r--r-- | src/cgeo/geocaching/mapsforge/mfMapView.java | 5 |
4 files changed, 5 insertions, 8 deletions
diff --git a/res/layout/googlemap.xml b/res/layout/googlemap.xml index 330c185..ffa22bc 100644 --- a/res/layout/googlemap.xml +++ b/res/layout/googlemap.xml @@ -43,7 +43,7 @@ <ImageView android:id="@+id/my_position" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentBottom="true" + android:layout_alignParentTop="true" android:layout_alignParentRight="true" android:layout_margin="5dip" android:padding="5dip" diff --git a/res/layout/mfmap.xml b/res/layout/mfmap.xml index addf0ed..3ffb122 100644 --- a/res/layout/mfmap.xml +++ b/res/layout/mfmap.xml @@ -42,7 +42,7 @@ <ImageView android:id="@+id/my_position" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentBottom="true" + android:layout_alignParentTop="true" android:layout_alignParentRight="true" android:layout_margin="5dip" android:padding="5dip" 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); } |
