From 033eec9500975f1482b03b8706359d733482beec Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Thu, 20 Jul 2017 00:16:09 +0300 Subject: mapwidget.qml: use map.newZoom and map.defaultZoomIn When centering on a map location, use the predefined zoom map.defaultZoomIn. Later the map should be able to center on (0, 0) and zoom-out if a dive doesn't have GPS data. Signed-off-by: Lubomir I. Ivanov --- mobile-widgets/qml/MapWidget.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml index 28754e0de..17b93c773 100644 --- a/mobile-widgets/qml/MapWidget.qml +++ b/mobile-widgets/qml/MapWidget.qml @@ -80,7 +80,7 @@ Item { NumberAnimation { target: map property: "zoomLevel" - to: 17 + to: map.newZoom duration: 3000 easing.type: Easing.InCubic } @@ -89,6 +89,7 @@ Item { function centerOnMapLocation(mapLocation) { map.newCenter = mapLocation.coordinate map.zoomLevel = 2 + map.newZoom = map.defaultZoomIn mapAnimation.restart() mapHelper.model.selectedUuid = mapLocation.uuid } -- cgit v1.2.3-70-g09d2