From 23c15d7549099a2386db42b0e76e6acc485780ad Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Sat, 11 Jul 2020 09:58:15 -0700 Subject: [PATCH] Only do no tile checks on Bing providers --- src/QtLocationPlugin/QGeoMapReplyQGC.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/QtLocationPlugin/QGeoMapReplyQGC.cpp b/src/QtLocationPlugin/QGeoMapReplyQGC.cpp index 557d144..7c8040e 100644 --- a/src/QtLocationPlugin/QGeoMapReplyQGC.cpp +++ b/src/QtLocationPlugin/QGeoMapReplyQGC.cpp @@ -129,7 +129,8 @@ QGeoTiledMapReplyQGC::networkReplyFinished() return; } QByteArray a = _reply->readAll(); - QString format = getQGCMapEngine()->urlFactory()->getImageFormat(tileSpec().mapId(), a); + UrlFactory* urlFactory = getQGCMapEngine()->urlFactory(); + QString format = urlFactory->getImageFormat(tileSpec().mapId(), a); //-- Test for a specialized, elevation data (not map tile) if( getQGCMapEngine()->urlFactory()->isElevation(tileSpec().mapId())){ a = TerrainTile::serialize(a); @@ -142,7 +143,8 @@ QGeoTiledMapReplyQGC::networkReplyFinished() } emit terrainDone(a, QNetworkReply::NoError); } else { - if (a == _bingNoTileImage) { + MapProvider* mapProvider = urlFactory->getMapProviderFromId(tileSpec().mapId()); + if (mapProvider && mapProvider->_isBingProvider() && a.size() && _bingNoTileImage.size() && a == _bingNoTileImage) { // Bing doesn't return an error if you request a tile above supported zoom level // It instead returns an image of a missing tile graphic. We need to detect that // and error out so Qt will deal with zooming correctly even if it doesn't have the tile.