diff --git a/src/lib/marble/VectorTileModel.cpp b/src/lib/marble/VectorTileModel.cpp index f3050a5e271759e399db2b2e0b66ec4a17a56e38..94a80262e8c89d838419dad1649010d3d1742ae6 100644 --- a/src/lib/marble/VectorTileModel.cpp +++ b/src/lib/marble/VectorTileModel.cpp @@ -131,7 +131,7 @@ void VectorTileModel::removeTilesOutOfView(const GeoDataLatLonBox &boundingBox) { GeoDataLatLonBox const extendedViewport = boundingBox.scaled(2.0, 2.0); for (auto iter = m_documents.begin(); iter != m_documents.end();) { - bool const isOutOfView = !extendedViewport.intersects(iter.value()->m_boundingBox); + bool const isOutOfView = !extendedViewport.intersects(iter.value()->latLonBox()); if (isOutOfView) { iter = m_documents.erase(iter); } else { diff --git a/src/lib/marble/VectorTileModel.h b/src/lib/marble/VectorTileModel.h index 1c01b6dc6b00ed4f852f9fb66c4d098c16b974d9..cbb064f9aa145f58bcb880dfd90c88a8c0aab197 100644 --- a/src/lib/marble/VectorTileModel.h +++ b/src/lib/marble/VectorTileModel.h @@ -93,12 +93,14 @@ private: /** Remove the document from the tree and delete the document */ ~CacheDocument(); - GeoDataDocument *const m_document; - VectorTileModel *m_vectorTileModel; - GeoDataLatLonBox m_boundingBox; + GeoDataLatLonBox latLonBox() const { return m_boundingBox; } private: Q_DISABLE_COPY( CacheDocument ) + + GeoDataDocument *const m_document; + VectorTileModel *const m_vectorTileModel; + GeoDataLatLonBox m_boundingBox; }; TileLoader *const m_loader;