From a1f35b6b21faa5e29c6616a34e5849a51f5c0dda Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 25 Feb 2016 11:52:47 -0800 Subject: [PATCH] Allow map zoom to go to 20 --- src/QtLocationPlugin/QGCMapUrlEngine.h | 2 +- src/QtLocationPlugin/QMLControl/OfflineMap.qml | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/QtLocationPlugin/QGCMapUrlEngine.h b/src/QtLocationPlugin/QGCMapUrlEngine.h index 57db85127..8a2831249 100644 --- a/src/QtLocationPlugin/QGCMapUrlEngine.h +++ b/src/QtLocationPlugin/QGCMapUrlEngine.h @@ -36,7 +36,7 @@ This file is part of the QGROUNDCONTROL project #include #include -#define MAX_MAP_ZOOM (18.0) +#define MAX_MAP_ZOOM (20.0) class UrlFactory : public QObject { Q_OBJECT diff --git a/src/QtLocationPlugin/QMLControl/OfflineMap.qml b/src/QtLocationPlugin/QMLControl/OfflineMap.qml index 4c78e3e6e..68a56908a 100644 --- a/src/QtLocationPlugin/QMLControl/OfflineMap.qml +++ b/src/QtLocationPlugin/QMLControl/OfflineMap.qml @@ -56,6 +56,9 @@ Rectangle { property int oldz0: 0 property int oldz1: 0 + readonly property real minZoomLevel: 3 + readonly property real maxZoomLevel: 20 + Component.onCompleted: { QGroundControl.mapEngineManager.loadTileSets() updateMap() @@ -357,8 +360,8 @@ Rectangle { } Slider { id: _slider0 - minimumValue: 3 - maximumValue: 18 + minimumValue: minZoomLevel + maximumValue: maxZoomLevel stepSize: 1 tickmarksEnabled: false orientation: Qt.Horizontal @@ -421,8 +424,8 @@ Rectangle { } Slider { id: _slider1 - minimumValue: 3 - maximumValue: 18 + minimumValue: minZoomLevel + maximumValue: maxZoomLevel stepSize: 1 tickmarksEnabled: false orientation: Qt.Horizontal -- 2.22.0