summaryrefslogtreecommitdiff
path: root/examples/location/mapviewer/map/MapComponent.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/location/mapviewer/map/MapComponent.qml')
-rw-r--r--examples/location/mapviewer/map/MapComponent.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/location/mapviewer/map/MapComponent.qml b/examples/location/mapviewer/map/MapComponent.qml
index c450a150..570505a0 100644
--- a/examples/location/mapviewer/map/MapComponent.qml
+++ b/examples/location/mapviewer/map/MapComponent.qml
@@ -604,9 +604,9 @@ Map {
var mouseGeoPos = map.toCoordinate(Qt.point(mouse.x, mouse.y));
var preZoomPoint = map.fromCoordinate(mouseGeoPos, false);
if (mouse.button === Qt.LeftButton) {
- map.zoomLevel++;
+ map.zoomLevel = Math.floor(map.zoomLevel + 1)
} else if (mouse.button === Qt.RightButton) {
- map.zoomLevel--;
+ map.zoomLevel = Math.floor(map.zoomLevel - 1)
}
var postZoomPoint = map.fromCoordinate(mouseGeoPos, false);
var dx = postZoomPoint.x - preZoomPoint.x;