diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-05-04 20:46:53 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2017-05-08 08:58:04 +0000 |
commit | d9a476f99216425ef3b76dfa054a9aab918b31be (patch) | |
tree | e3ac3d5e4104293c9111c798f6e9b0117be75c62 /src/location/maps/qgeotiledmap.cpp | |
parent | 6e276607e507f36bd94c33652071cf0413c6ba3a (diff) | |
download | qtlocation-d9a476f99216425ef3b76dfa054a9aab918b31be.tar.gz |
Add a way to skip showing tiles
In certain cases servers provide tiles that can be fully transparent,
provide no content or are bogus.
Tile fetchers can be smart and detect some of these cases.
This patch offers an extensible way to allow them to communicate (via
a null QImage) tiles that should not be rendered, in addition to
an extensible mechanism to identify such tiles on disk.
The default way is by assuming that, once such tiles have been
detected, the tile fetcher would simply write a file with "NoRetry" as
content.
Change-Id: I404bb4dcc38fdd33c412f7407601b47947e4ce8d
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/maps/qgeotiledmap.cpp')
-rw-r--r-- | src/location/maps/qgeotiledmap.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/location/maps/qgeotiledmap.cpp b/src/location/maps/qgeotiledmap.cpp index dbfe45ea..0eeb189d 100644 --- a/src/location/maps/qgeotiledmap.cpp +++ b/src/location/maps/qgeotiledmap.cpp @@ -391,7 +391,7 @@ void QGeoTiledMapPrivate::updateTile(const QGeoTileSpec &spec) // Only promote the texture up to GPU if it is visible if (m_visibleTiles->createTiles().contains(spec)){ QSharedPointer<QGeoTileTexture> tex = m_tileRequests->tileTexture(spec); - if (!tex.isNull()) { + if (!tex.isNull() && !tex->image.isNull()) { m_mapScene->addTile(spec, tex); emit q->sgNodeChanged(); } |