diff --git a/src/QtLocationPlugin/QGCMapEngine.cpp b/src/QtLocationPlugin/QGCMapEngine.cpp index 65fdcab0df19dbe1c779f35c0b76af9598f26780..abcbcc413ceb0ee6277e2457bb32bd4223b26a80 100644 --- a/src/QtLocationPlugin/QGCMapEngine.cpp +++ b/src/QtLocationPlugin/QGCMapEngine.cpp @@ -112,7 +112,7 @@ getQGCMapEngine() } //----------------------------------------------------------------------------- -const double QGCMapEngine::srtm1TileSize = 0.025; +const double QGCMapEngine::srtm1TileSize = 0.01; //----------------------------------------------------------------------------- void @@ -393,9 +393,6 @@ QGCMapEngine::getMapNameList() mapList << kEsriTypes[i].name; } } - for(size_t i = 0; i < NUM_ELEVMAPS; i++) { - mapList << kElevationTypes[i].name; - } return mapList; } diff --git a/src/QtLocationPlugin/QGCMapUrlEngine.cpp b/src/QtLocationPlugin/QGCMapUrlEngine.cpp index 95c6de3e1e4d39a4fa564acb115869033f6e4f69..74cea6cb0db96c3ff5a56d5aae34d429d006006c 100644 --- a/src/QtLocationPlugin/QGCMapUrlEngine.cpp +++ b/src/QtLocationPlugin/QGCMapUrlEngine.cpp @@ -552,7 +552,7 @@ UrlFactory::_tryCorrectGoogleVersions(QNetworkAccessManager* networkManager) #define AVERAGE_MAPBOX_SAT_MAP 15739 #define AVERAGE_MAPBOX_STREET_MAP 5648 #define AVERAGE_TILE_SIZE 13652 -#define AVERAGE_AIRMAP_ELEV_SIZE 34000 +#define AVERAGE_AIRMAP_ELEV_SIZE 5360 //----------------------------------------------------------------------------- quint32 diff --git a/src/QtLocationPlugin/QMLControl/OfflineMap.qml b/src/QtLocationPlugin/QMLControl/OfflineMap.qml index cd132a5af21e0efeba35ff210ef8203f22ac0789..9fc876e55db96495ab014334793e388248c93655 100644 --- a/src/QtLocationPlugin/QMLControl/OfflineMap.qml +++ b/src/QtLocationPlugin/QMLControl/OfflineMap.qml @@ -433,7 +433,7 @@ QGCView { Row { spacing: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter - visible: !_defaultSet + visible: !_defaultSet && mapType !== "Airmap Elevation Data" QGCLabel { text: qsTr("Zoom Levels:"); width: infoView._labelWidth; } QGCLabel { text: offlineMapView._currentSelection ? (offlineMapView._currentSelection.minZoom + " - " + offlineMapView._currentSelection.maxZoom) : ""; horizontalAlignment: Text.AlignRight; width: infoView._valueWidth; } } @@ -737,8 +737,10 @@ QGCView { anchors.right: parent.right text: qsTr("Fetch elevation data") checked: QGroundControl.mapEngineManager.fetchElevation - onClicked: QGroundControl.mapEngineManager.fetchElevation = checked - visible: mapType != "Airmap Elevation Data" + onClicked: { + QGroundControl.mapEngineManager.fetchElevation = checked + handleChanges() + } } } diff --git a/src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc b/src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc index ea64716f8bef3a36b675c302a37a790cc076a8a8..926845cf53cf35776af275b5fdf4c694ba13b705 100644 --- a/src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc +++ b/src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc @@ -83,6 +83,10 @@ QGCMapEngineManager::updateForCurrentView(double lon0, double lat0, double lon1, QGCTileSet set = QGCMapEngine::getTileCount(z, lon0, lat0, lon1, lat1, mapType); _totalSet += set; } + if (_fetchElevation) { + QGCTileSet set = QGCMapEngine::getTileCount(1, lon0, lat0, lon1, lat1, UrlFactory::AirmapElevation); + _totalSet += set; + } emit tileX0Changed(); emit tileX1Changed(); emit tileY0Changed(); diff --git a/src/TerrainTile.h b/src/TerrainTile.h index ccc6ac8d385e2a889f2db3d84ca91047fd90cf20..6f6254fc2c0cc02f8c746e5c83c9288ebd54584d 100644 --- a/src/TerrainTile.h +++ b/src/TerrainTile.h @@ -5,8 +5,6 @@ #include -#define TERRAIN_TILE_SIZE 91 - Q_DECLARE_LOGGING_CATEGORY(TerrainTileLog) /**