mapwidget.qml: add an small icon (top-left) to toggle the map type

Clicking the image toggles the map.activeMapType value from type
STREET to type SATELLITE.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-07-20 03:07:47 +03:00 committed by Dirk Hohndel
parent 468f3b57c0
commit 8487873029

View file

@ -112,5 +112,16 @@ Item {
mapHelper.model.selectedUuid = 0
animateMapZoomOut()
}
Image {
x: 10; y: x
source: "qrc:///mapwidget-toggle-" + (map.activeMapType === map.mapType.SATELLITE ? "street" : "satellite")
MouseArea {
anchors.fill: parent
onClicked: {
map.activeMapType = map.activeMapType === map.mapType.SATELLITE ? map.mapType.STREET : map.mapType.SATELLITE
}
}
}
}
}