summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/location/maps/qgeotilefetcher.cpp7
-rw-r--r--src/location/maps/qgeotilefetcher_p.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/location/maps/qgeotilefetcher.cpp b/src/location/maps/qgeotilefetcher.cpp
index 70ebbcd1..bab75034 100644
--- a/src/location/maps/qgeotilefetcher.cpp
+++ b/src/location/maps/qgeotilefetcher.cpp
@@ -126,7 +126,7 @@ void QGeoTileFetcher::requestNextTile()
const QGeoCameraCapabilities & cameraCaps = d->engine_->cameraCapabilities(ts.mapId());
// the ZL in QGeoTileSpec is relative to the native tile size of the provider.
// It gets denormalized in QGeoTiledMap.
- if (ts.zoom() < cameraCaps.minimumZoomLevel() || ts.zoom() > cameraCaps.maximumZoomLevel())
+ if (ts.zoom() < cameraCaps.minimumZoomLevel() || ts.zoom() > cameraCaps.maximumZoomLevel() || !fetchingEnabled())
return;
QGeoTiledMapReply *reply = getTileImage(ts);
@@ -189,6 +189,11 @@ bool QGeoTileFetcher::initialized() const
return true;
}
+bool QGeoTileFetcher::fetchingEnabled() const
+{
+ return true;
+}
+
void QGeoTileFetcher::handleReply(QGeoTiledMapReply *reply, const QGeoTileSpec &spec)
{
Q_D(QGeoTileFetcher);
diff --git a/src/location/maps/qgeotilefetcher_p.h b/src/location/maps/qgeotilefetcher_p.h
index d052a8a8..88880424 100644
--- a/src/location/maps/qgeotilefetcher_p.h
+++ b/src/location/maps/qgeotilefetcher_p.h
@@ -89,6 +89,7 @@ protected:
void timerEvent(QTimerEvent *event);
QAbstractGeoTileCache::CacheAreas cacheHint() const;
virtual bool initialized() const;
+ virtual bool fetchingEnabled() const;
private: