Commit 1f27b9f1 authored by Andreas Bircher's avatar Andreas Bircher

smaller tiles and only allow offline caching downloading together with map tiles

parent 07bb2365
......@@ -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;
}
......
......@@ -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
......
......@@ -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()
}
}
}
......
......@@ -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();
......
......@@ -5,8 +5,6 @@
#include <QGeoCoordinate>
#define TERRAIN_TILE_SIZE 91
Q_DECLARE_LOGGING_CATEGORY(TerrainTileLog)
/**
......
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