mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 06:45:27 +00:00
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:
parent
468f3b57c0
commit
8487873029
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue