diff --git a/src/QtLocationPlugin/ElevationMapProvider.h b/src/QtLocationPlugin/ElevationMapProvider.h index 09b082729ef3d2a8a8dd7c764bf1a9d990acc309..076dc51a076326c2ac262d6daf54cbd5c1159212 100644 --- a/src/QtLocationPlugin/ElevationMapProvider.h +++ b/src/QtLocationPlugin/ElevationMapProvider.h @@ -21,6 +21,7 @@ class ElevationProvider : public MapProvider { ~ElevationProvider(); + bool _isElevationProvider(){return true;} protected: // Define the url to Request diff --git a/src/QtLocationPlugin/MapProvider.cpp b/src/QtLocationPlugin/MapProvider.cpp index e0eda12df0d74f3a73749dba3d82a5e752a97686..666008ea1d539d161d70b187dcfac96092ab2312 100644 --- a/src/QtLocationPlugin/MapProvider.cpp +++ b/src/QtLocationPlugin/MapProvider.cpp @@ -73,3 +73,5 @@ int MapProvider::lat2tileY(double lat, int z) { log(tan(lat * M_PI / 180.0) + 1.0 / cos(lat * M_PI / 180.0)) / M_PI) / 2.0 * pow(2.0, z))); } + +bool MapProvider::_isElevationProvider(){return false;} diff --git a/src/QtLocationPlugin/MapProvider.h b/src/QtLocationPlugin/MapProvider.h index bdf769fd03bf758799399874e15dc44b519851a0..79c1c6df14541a1e08c23edec4e0139307b76d89 100644 --- a/src/QtLocationPlugin/MapProvider.h +++ b/src/QtLocationPlugin/MapProvider.h @@ -33,6 +33,8 @@ class MapProvider : public QObject { virtual int lat2tileY(double lat, int z); + virtual bool _isElevationProvider(); + protected: QString _tileXYToQuadKey(int tileX, int tileY, int levelOfDetail); int _getServerNum(int x, int y, int max); diff --git a/src/QtLocationPlugin/QGCMapEngine.cpp b/src/QtLocationPlugin/QGCMapEngine.cpp index 498842fb969745ff3b5c654c2cfb85331be3b68e..0eff56253aa13b21d18458ee27b2ca5b1ce08ec2 100644 --- a/src/QtLocationPlugin/QGCMapEngine.cpp +++ b/src/QtLocationPlugin/QGCMapEngine.cpp @@ -264,7 +264,6 @@ QGCMapEngine::getTileCount(int zoom, double topleftLon, double topleftLat, doubl } set.tileCount = (static_cast(set.tileX1) - static_cast(set.tileX0) + 1) * (static_cast(set.tileY1) - static_cast(set.tileY0) + 1); - qDebug() << "getTileCount : " << set.tileCount; set.tileSize = getQGCMapEngine()->urlFactory()->averageSizeForType(mapType) * set.tileCount; return set; } diff --git a/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp b/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp index 996cf98d58b994918ed817bff8e079059cf9fe66..c24dc7e41b34f569c394047efefad85d64a35a88 100644 --- a/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp +++ b/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp @@ -106,7 +106,9 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian while(i.hasNext()){ i.next(); - mapList.append(QGCGEOMAPTYPE(i.value()->getMapStyle(), i.key(), i.key(), false, false, getQGCMapEngine()->urlFactory()->getIdFromType(i.key()) )); + if(!i.value()->_isElevationProvider()){ + mapList.append(QGCGEOMAPTYPE(i.value()->getMapStyle(), i.key(), i.key(), false, false, getQGCMapEngine()->urlFactory()->getIdFromType(i.key()) )); + } } setSupportedMapTypes(mapList);