On 16 September 2017 at 20:42, Stefan Fuchs <[email protected]> wrote:
>
> Lubomir was faster and confirms what I already typed into the mail:
> No, I didn't fix this. What is the case is that the missing private header
> file "qgeofiletilecache_p.h" is simply not existing when checking out
> version 5.5.1 of qtlocation. I checked out 5.6.0 now from git and there the
> file is available.
> So you're most probably right and Qt 5.6.0 is the minimum requirement for
> googlemaps plugin.
>

Stefan, please try the attached patch.

copy the patch in the googlemaps plugin directory and call this:
$ git apply <name.patch>
$ qmake
$ make

if it builds try building and running subsurface again:
- does it show the map? are there crashes?
- try the zoom-in / out, and panning around
- disable your internet connection for a while and see if the map
tiles are cached for offline mode

if there are errors or any warnings, please report them.

thanks
lubomir
--
diff --git a/qgeotiledmappingmanagerenginegooglemaps.cpp b/qgeotiledmappingmanagerenginegooglemaps.cpp
index ca1843d..2534e76 100644
--- a/qgeotiledmappingmanagerenginegooglemaps.cpp
+++ b/qgeotiledmappingmanagerenginegooglemaps.cpp
@@ -3,7 +3,11 @@
 #include "qgeotiledmapgooglemaps.h"
 #include "qgeotilefetchergooglemaps.h"
 #include "QtLocation/private/qgeotilespec_p.h"
+#if QT_VERSION < QT_VERSION_CHECK(5,6,0)
+#include "QtLocation/private/qgeotilecache_p.h"
+#else
 #include "QtLocation/private/qgeofiletilecache_p.h"
+#endif
 
 #include <QDebug>
 #include <QDir>
@@ -56,9 +60,16 @@ QGeoTiledMappingManagerEngineGooglemaps::QGeoTiledMappingManagerEngineGooglemaps
     else
         m_cacheDirectory = QAbstractGeoTileCache::baseCacheDirectory() + QLatin1String("googlemaps");
 
+    const int szCache = 100 * 1024 * 1024;
+#if QT_VERSION < QT_VERSION_CHECK(5,6,0)
+    QGeoTileCache *tileCache = createTileCacheWithDir(m_cacheDirectory);
+    if (tileCache)
+        tileCache->setMaxDiskUsage(szCache);
+#else
     QAbstractGeoTileCache *tileCache = new QGeoFileTileCache(m_cacheDirectory);
-    tileCache->setMaxDiskUsage(100 * 1024 * 1024);
+    tileCache->setMaxDiskUsage(szCache);
     setTileCache(tileCache);
+#endif
 
     *error = QGeoServiceProvider::NoError;
     errorString->clear();
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to