diff options
Diffstat (limited to 'src/location/maps/qgeomapscene.cpp')
-rw-r--r-- | src/location/maps/qgeomapscene.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/location/maps/qgeomapscene.cpp b/src/location/maps/qgeomapscene.cpp index c8b39232..7aea014d 100644 --- a/src/location/maps/qgeomapscene.cpp +++ b/src/location/maps/qgeomapscene.cpp @@ -231,6 +231,16 @@ void QGeoMapScene::paintGL(QGLPainter *painter) d->paintGL(painter); } +QSet<QGeoTileSpec> QGeoMapScene::texturedTiles() +{ + Q_D(QGeoMapScene); + QSet<QGeoTileSpec> textured; + foreach (const QGeoTileSpec &tile, d->textures_.keys()) { + textured += tile; + } + return textured; +} + QGeoMapScenePrivate::QGeoMapScenePrivate(QGeoMapScene *scene) : tileSize_(0), camera_(new QGLCamera()), @@ -400,6 +410,8 @@ void QGeoMapScenePrivate::setScalingOnTextures() void QGeoMapScenePrivate::addTile(const QGeoTileSpec &spec, QSharedPointer<QGeoTileTexture> texture) { + if (!visibleTiles_.contains(spec)) // Don't add the geometry if it isn't visible + return; if (linearScaling_) { texture->texture->setBindOptions(texture->texture->bindOptions() | (QGLTexture2D::LinearFilteringBindOption)); |