Commit 83d7845e authored by Pierre TILAK's avatar Pierre TILAK

add MapProvider _isElevation attributes

parent 5ba79984
...@@ -21,6 +21,7 @@ class ElevationProvider : public MapProvider { ...@@ -21,6 +21,7 @@ class ElevationProvider : public MapProvider {
~ElevationProvider(); ~ElevationProvider();
bool _isElevationProvider(){return true;}
protected: protected:
// Define the url to Request // Define the url to Request
......
...@@ -73,3 +73,5 @@ int MapProvider::lat2tileY(double lat, int z) { ...@@ -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) / log(tan(lat * M_PI / 180.0) + 1.0 / cos(lat * M_PI / 180.0)) / M_PI) /
2.0 * pow(2.0, z))); 2.0 * pow(2.0, z)));
} }
bool MapProvider::_isElevationProvider(){return false;}
...@@ -33,6 +33,8 @@ class MapProvider : public QObject { ...@@ -33,6 +33,8 @@ class MapProvider : public QObject {
virtual int lat2tileY(double lat, int z); virtual int lat2tileY(double lat, int z);
virtual bool _isElevationProvider();
protected: protected:
QString _tileXYToQuadKey(int tileX, int tileY, int levelOfDetail); QString _tileXYToQuadKey(int tileX, int tileY, int levelOfDetail);
int _getServerNum(int x, int y, int max); int _getServerNum(int x, int y, int max);
......
...@@ -264,7 +264,6 @@ QGCMapEngine::getTileCount(int zoom, double topleftLon, double topleftLat, doubl ...@@ -264,7 +264,6 @@ QGCMapEngine::getTileCount(int zoom, double topleftLon, double topleftLat, doubl
} }
set.tileCount = (static_cast<quint64>(set.tileX1) - static_cast<quint64>(set.tileX0) + 1) * (static_cast<quint64>(set.tileY1) - static_cast<quint64>(set.tileY0) + 1); set.tileCount = (static_cast<quint64>(set.tileX1) - static_cast<quint64>(set.tileX0) + 1) * (static_cast<quint64>(set.tileY1) - static_cast<quint64>(set.tileY0) + 1);
qDebug() << "getTileCount : " << set.tileCount;
set.tileSize = getQGCMapEngine()->urlFactory()->averageSizeForType(mapType) * set.tileCount; set.tileSize = getQGCMapEngine()->urlFactory()->averageSizeForType(mapType) * set.tileCount;
return set; return set;
} }
......
...@@ -106,7 +106,9 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian ...@@ -106,7 +106,9 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian
while(i.hasNext()){ while(i.hasNext()){
i.next(); 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); setSupportedMapTypes(mapList);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment