aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/layout/googlemap.xml2
-rw-r--r--res/layout/mfmap.xml2
-rw-r--r--src/cgeo/geocaching/mapcommon/cgeomap.java4
-rw-r--r--src/cgeo/geocaching/mapsforge/mfMapView.java5
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);
}