mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 05:33:23 +00:00
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:
parent
6299a3c93b
commit
033eec9500
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue