Hi,

with recent (since ~Feb. 2012) maps from openmtbmap.org there is no address search on my eTrex Vista HCx with maps exported from QLGT, because QLGT only exports the MDR file if there is exactly one file matching either *mdr* or *MDR* in the map directory. Recent openmtb maps contain contour lines and have both mapsetc_mdr.img and mapsetx_mdr.img.

Attached is a patch for CMapTDB::checkMdrFile() which checks specifically for ${basename}_mdr.img if more than one MDR file exists in the map directory.

Regards
Michael
From 5bfc66eb8568b08a17c175ead5961d056ec1c909 Mon Sep 17 00:00:00 2001
From: Michael Klein <[email protected]>
Date: Tue, 3 Jul 2012 22:18:45 +0200
Subject: [PATCH] CMapTDB::checkMdrFile(): check ${basename}_mdr.img

---
 src/CMapTDB.cpp |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/CMapTDB.cpp b/src/CMapTDB.cpp
index 3cca602..9a50dc8 100644
--- a/src/CMapTDB.cpp
+++ b/src/CMapTDB.cpp
@@ -869,7 +869,14 @@ void CMapTDB::checkMdrFile()
     {
         mdrfile = mdrfiles.first();
     }
-
+    else
+    {
+        int idx(mdrfiles.indexOf(fi.completeBaseName() + "_mdr.img", 
Qt::CaseInsensitive));
+        if (idx != -1)
+        {
+            mdrfile = mdrfiles[idx];
+        }
+    }
 }
 
 void CMapTDB::checkTypFiles()
-- 
1.7.10.4

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

Reply via email to