|
|
|
@ -78,19 +78,19 @@ QGCMapEngineManager::updateForCurrentView(double lon0, double lat0, double lon1,
@@ -78,19 +78,19 @@ QGCMapEngineManager::updateForCurrentView(double lon0, double lat0, double lon1,
|
|
|
|
|
_bottomRightLon = lon1; |
|
|
|
|
_minZoom = minZoom; |
|
|
|
|
_maxZoom = maxZoom; |
|
|
|
|
_totalSet.clear(); |
|
|
|
|
|
|
|
|
|
_imageSet.clear(); |
|
|
|
|
_elevationSet.clear(); |
|
|
|
|
|
|
|
|
|
for(int z = minZoom; z <= maxZoom; z++) { |
|
|
|
|
QGCTileSet set = QGCMapEngine::getTileCount(z, lon0, lat0, lon1, lat1, mapType); |
|
|
|
|
_totalSet += set; |
|
|
|
|
_imageSet += set; |
|
|
|
|
} |
|
|
|
|
if (_fetchElevation) { |
|
|
|
|
QGCTileSet set = QGCMapEngine::getTileCount(1, lon0, lat0, lon1, lat1, UrlFactory::AirmapElevation); |
|
|
|
|
_totalSet += set; |
|
|
|
|
_elevationSet += set; |
|
|
|
|
} |
|
|
|
|
emit tileX0Changed(); |
|
|
|
|
emit tileX1Changed(); |
|
|
|
|
emit tileY0Changed(); |
|
|
|
|
emit tileY1Changed(); |
|
|
|
|
|
|
|
|
|
emit tileCountChanged(); |
|
|
|
|
emit tileSizeChanged(); |
|
|
|
|
|
|
|
|
@ -101,14 +101,14 @@ QGCMapEngineManager::updateForCurrentView(double lon0, double lat0, double lon1,
@@ -101,14 +101,14 @@ QGCMapEngineManager::updateForCurrentView(double lon0, double lat0, double lon1,
|
|
|
|
|
QString |
|
|
|
|
QGCMapEngineManager::tileCountStr() |
|
|
|
|
{ |
|
|
|
|
return QGCMapEngine::numberToString(_totalSet.tileCount); |
|
|
|
|
return QGCMapEngine::numberToString(_imageSet.tileCount + _elevationSet.tileCount); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
QString |
|
|
|
|
QGCMapEngineManager::tileSizeStr() |
|
|
|
|
{ |
|
|
|
|
return QGCMapEngine::bigSizeToString(_totalSet.tileSize); |
|
|
|
|
return QGCMapEngine::bigSizeToString(_imageSet.tileSize + _elevationSet.tileSize); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
@ -142,7 +142,7 @@ QGCMapEngineManager::_tileSetFetched(QGCCachedTileSet* tileSet)
@@ -142,7 +142,7 @@ QGCMapEngineManager::_tileSetFetched(QGCCachedTileSet* tileSet)
|
|
|
|
|
void |
|
|
|
|
QGCMapEngineManager::startDownload(const QString& name, const QString& mapType) |
|
|
|
|
{ |
|
|
|
|
if(_totalSet.tileSize) { |
|
|
|
|
if(_imageSet.tileSize) { |
|
|
|
|
QGCCachedTileSet* set = new QGCCachedTileSet(name); |
|
|
|
|
set->setMapTypeStr(mapType); |
|
|
|
|
set->setTopleftLat(_topleftLat); |
|
|
|
@ -151,8 +151,8 @@ QGCMapEngineManager::startDownload(const QString& name, const QString& mapType)
@@ -151,8 +151,8 @@ QGCMapEngineManager::startDownload(const QString& name, const QString& mapType)
|
|
|
|
|
set->setBottomRightLon(_bottomRightLon); |
|
|
|
|
set->setMinZoom(_minZoom); |
|
|
|
|
set->setMaxZoom(_maxZoom); |
|
|
|
|
set->setTotalTileSize(_totalSet.tileSize); |
|
|
|
|
set->setTotalTileCount(_totalSet.tileCount); |
|
|
|
|
set->setTotalTileSize(_imageSet.tileSize); |
|
|
|
|
set->setTotalTileCount(_imageSet.tileCount); |
|
|
|
|
set->setType(QGCMapEngine::getTypeFromName(mapType)); |
|
|
|
|
QGCCreateTileSetTask* task = new QGCCreateTileSetTask(set); |
|
|
|
|
//-- Create Tile Set (it will also create a list of tiles to download)
|
|
|
|
@ -171,8 +171,8 @@ QGCMapEngineManager::startDownload(const QString& name, const QString& mapType)
@@ -171,8 +171,8 @@ QGCMapEngineManager::startDownload(const QString& name, const QString& mapType)
|
|
|
|
|
set->setBottomRightLon(_bottomRightLon); |
|
|
|
|
set->setMinZoom(1); |
|
|
|
|
set->setMaxZoom(1); |
|
|
|
|
set->setTotalTileSize(_totalSet.tileSize); |
|
|
|
|
set->setTotalTileCount(_totalSet.tileCount); |
|
|
|
|
set->setTotalTileSize(_elevationSet.tileSize); |
|
|
|
|
set->setTotalTileCount(_elevationSet.tileCount); |
|
|
|
|
set->setType(QGCMapEngine::getTypeFromName("Airmap Elevation Data")); |
|
|
|
|
QGCCreateTileSetTask* task = new QGCCreateTileSetTask(set); |
|
|
|
|
//-- Create Tile Set (it will also create a list of tiles to download)
|
|
|
|
|