mapwidget.qml: add deselectMapLocation()

When called this function will zoom-out the map and set it's center to
(0, 0)

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-07-20 00:29:42 +03:00 committed by Dirk Hohndel
parent 3e3b4baee2
commit 23c56b3c31

View file

@ -95,8 +95,13 @@ Item {
function centerOnMapLocation(mapLocation) {
zoomLevel = defaultZoomOut
animateMapTo(mapLocation.coordinate, defaultZoomIn);
animateMapTo(mapLocation.coordinate, defaultZoomIn)
mapHelper.model.selectedUuid = mapLocation.uuid
}
function deselectMapLocation() {
mapHelper.model.selectedUuid = 0
animateMapTo(defaultCenter, defaultZoomOut)
}
}
}