summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/location/mapviewer/map/MapComponent.qml3
-rw-r--r--src/imports/location/qdeclarativegeomap.cpp5
-rw-r--r--src/imports/location/qquickgeomapgesturearea_p.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/examples/location/mapviewer/map/MapComponent.qml b/examples/location/mapviewer/map/MapComponent.qml
index d2d526d1..008a4a00 100644
--- a/examples/location/mapviewer/map/MapComponent.qml
+++ b/examples/location/mapviewer/map/MapComponent.qml
@@ -377,7 +377,8 @@ Map {
orientation : Qt.Vertical
value: map.zoomLevel
onValueChanged: {
- map.zoomLevel = value
+ if (value >= 0)
+ map.zoomLevel = value
}
}
diff --git a/src/imports/location/qdeclarativegeomap.cpp b/src/imports/location/qdeclarativegeomap.cpp
index 9b5c658f..fd98b2ca 100644
--- a/src/imports/location/qdeclarativegeomap.cpp
+++ b/src/imports/location/qdeclarativegeomap.cpp
@@ -548,13 +548,14 @@ void QDeclarativeGeoMap::mappingManagerInitialized()
//The zoom level limits are only restricted by the plugins values, if the user has set a more
//strict zoom level limit before initialization nothing is done here.
//minimum zoom level might be changed to limit gray bundaries
- if (m_mappingManager->cameraCapabilities().minimumZoomLevel() > m_gestureArea->minimumZoomLevel())
- setMinimumZoomLevel(m_mappingManager->cameraCapabilities().minimumZoomLevel());
if (m_gestureArea->maximumZoomLevel() < 0
|| m_mappingManager->cameraCapabilities().maximumZoomLevel() < m_gestureArea->maximumZoomLevel())
setMaximumZoomLevel(m_mappingManager->cameraCapabilities().maximumZoomLevel());
+ if (m_mappingManager->cameraCapabilities().minimumZoomLevel() > m_gestureArea->minimumZoomLevel())
+ setMinimumZoomLevel(m_mappingManager->cameraCapabilities().minimumZoomLevel());
+
// Map tiles are built in this call. m_map->minimumZoom() becomes operational
// after this has been called at least once, after creation.
diff --git a/src/imports/location/qquickgeomapgesturearea_p.h b/src/imports/location/qquickgeomapgesturearea_p.h
index cfd8738e..51c5cc1e 100644
--- a/src/imports/location/qquickgeomapgesturearea_p.h
+++ b/src/imports/location/qquickgeomapgesturearea_p.h
@@ -242,7 +242,7 @@ private:
bool m_enabled;
struct Zoom
{
- Zoom() : m_minimum(-1.0), m_maximum(-1.0), m_start(0.0), m_previous(0.0),
+ Zoom() : m_minimum(-1.0), m_maximum(20.0), m_start(0.0), m_previous(0.0),
maximumChange(4.0) {}
qreal m_minimum;
qreal m_maximum;