summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeofiletilecache.cpp
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-06-15 22:50:21 +0200
committerPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-06-30 11:40:05 +0000
commit706f97d93b7e0e01bc287d9379e692ffd1bd08a6 (patch)
tree5d9d9aa54abee0902eae1e6f3a38adc9b2454fc5 /src/location/maps/qgeofiletilecache.cpp
parente729fabed1b78729f65503ed3a7e0d5fddb13947 (diff)
downloadqtlocation-706f97d93b7e0e01bc287d9379e692ffd1bd08a6.tar.gz
Improve Mapbox geoservice plugin
This patch adds standard mapbox map modes so that they could be used out of the box without the need for specifying it as parameter, and also adds a QGeoFileTileCache to the plugin, since the Mapbox TOS allow a limited caching even in the free plan. The default cache max disk usage has been set accordingly. The mapbox.map_id parameter is now optional, meaning that things will work like before if present, but will work with the default mapbox styles if not. Change-Id: I4056a3706f47d7f5c46a873c135b743106647fc0 Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
Diffstat (limited to 'src/location/maps/qgeofiletilecache.cpp')
-rw-r--r--src/location/maps/qgeofiletilecache.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/location/maps/qgeofiletilecache.cpp b/src/location/maps/qgeofiletilecache.cpp
index 3d381dc2..73c9fe29 100644
--- a/src/location/maps/qgeofiletilecache.cpp
+++ b/src/location/maps/qgeofiletilecache.cpp
@@ -390,7 +390,7 @@ QSharedPointer<QGeoTileTexture> QGeoFileTileCache::addToTextureCache(const QGeoT
return tt;
}
-QString QGeoFileTileCache::tileSpecToFilename(const QGeoTileSpec &spec, const QString &format, const QString &directory)
+QString QGeoFileTileCache::tileSpecToFilename(const QGeoTileSpec &spec, const QString &format, const QString &directory) const
{
QString filename = spec.plugin();
filename += QLatin1String("-");
@@ -416,7 +416,7 @@ QString QGeoFileTileCache::tileSpecToFilename(const QGeoTileSpec &spec, const QS
return dir.filePath(filename);
}
-QGeoTileSpec QGeoFileTileCache::filenameToTileSpec(const QString &filename)
+QGeoTileSpec QGeoFileTileCache::filenameToTileSpec(const QString &filename) const
{
QGeoTileSpec emptySpec;