mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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 {
|
NumberAnimation {
|
||||||
target: map
|
target: map
|
||||||
property: "zoomLevel"
|
property: "zoomLevel"
|
||||||
to: 17
|
to: map.newZoom
|
||||||
duration: 3000
|
duration: 3000
|
||||||
easing.type: Easing.InCubic
|
easing.type: Easing.InCubic
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,7 @@ Item {
|
||||||
function centerOnMapLocation(mapLocation) {
|
function centerOnMapLocation(mapLocation) {
|
||||||
map.newCenter = mapLocation.coordinate
|
map.newCenter = mapLocation.coordinate
|
||||||
map.zoomLevel = 2
|
map.zoomLevel = 2
|
||||||
|
map.newZoom = map.defaultZoomIn
|
||||||
mapAnimation.restart()
|
mapAnimation.restart()
|
||||||
mapHelper.model.selectedUuid = mapLocation.uuid
|
mapHelper.model.selectedUuid = mapLocation.uuid
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue