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 <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-07-20 00:16:09 +03:00 committed by Dirk Hohndel
parent 6299a3c93b
commit 033eec9500

View file

@ -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
}