@ -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 ;
_image Set + = set ;
}
if ( _fetchElevation ) {
QGCTileSet set = QGCMapEngine : : getTileCount ( 1 , lon0 , lat0 , lon1 , lat1 , UrlFactory : : AirmapElevation ) ;
_total Set + = set ;
_elevation Set + = 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 ( _total Set . tileCount ) ;
return QGCMapEngine : : numberToString ( _imageSe t . tileC oun t + _elevation Set . tileCount ) ;
}
//-----------------------------------------------------------------------------
QString
QGCMapEngineManager : : tileSizeStr ( )
{
return QGCMapEngine : : bigSizeToString ( _total Set . tileSize ) ;
return QGCMapEngine : : bigSizeToString ( _imageSet . tileSize + _elevation Set . 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 ( _total Set . tileSize ) {
if ( _image Set . 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 ( _total Set . tileSize ) ;
set - > setTotalTileCount ( _total Set . tileCount ) ;
set - > setTotalTileSize ( _image Set . tileSize ) ;
set - > setTotalTileCount ( _image Set . 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 ( _total Set . tileSize ) ;
set - > setTotalTileCount ( _total Set . tileCount ) ;
set - > setTotalTileSize ( _elevation Set . tileSize ) ;
set - > setTotalTileCount ( _elevation Set . 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)