summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeotiledmap_p_p.h
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2015-07-03 15:20:46 +0200
committerMichal Klocek <michal.klocek@theqtcompany.com>2016-02-09 13:58:43 +0000
commit5fd9681a3563e2346c722bcd779e2b16cd4ac9fd (patch)
tree0d85e40638232803e25c0b42f0715e7d363a07ad /src/location/maps/qgeotiledmap_p_p.h
parentf5f23c4279b454e2465e7f9835b04cc80332f3a0 (diff)
downloadqtlocation-5fd9681a3563e2346c722bcd779e2b16cd4ac9fd.tar.gz
Refactor prefetching tiles
Current implementation uses same QGeoCameraTiles object to calculate visible tiles and tiles which should be prefetched. This is semi optimal since frustum intersection algorithm uses bunch of different parameters. Simplify the logic and use separate objects, this way values in both cases are cached and calculation is done when required. This is important since prefetchData can be called anytime from map's API. Remove textured tiles from scene when clearCache called, this will force redownload of all the tiles. Add new unit test qgeotiledmap and move prefetch test due to refactoring. Change-Id: I6a906df405f212436cdd35ac76f95b559e6b7aae Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/location/maps/qgeotiledmap_p_p.h')
-rw-r--r--src/location/maps/qgeotiledmap_p_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/location/maps/qgeotiledmap_p_p.h b/src/location/maps/qgeotiledmap_p_p.h
index 2e93a006..15442bd1 100644
--- a/src/location/maps/qgeotiledmap_p_p.h
+++ b/src/location/maps/qgeotiledmap_p_p.h
@@ -93,9 +93,12 @@ private:
private:
QAbstractGeoTileCache *m_cache;
- QGeoCameraTiles *m_cameraTiles;
+ QGeoCameraTiles *m_visibleTiles;
+ QGeoCameraTiles *m_prefetchTiles;
QGeoMapScene *m_mapScene;
QGeoTileRequestManager *m_tileRequests;
+ int m_maxZoomLevel;
+ QGeoTiledMap::PrefetchStyle m_prefetchStyle;
Q_DISABLE_COPY(QGeoTiledMapPrivate)
};