Add gesture support to maps

This commit is contained in:
Jon Beniston 2022-12-20 11:14:32 +00:00
parent 1a7c995e43
commit e023611bf2
3 changed files with 6 additions and 0 deletions

View File

@ -52,6 +52,8 @@ Item {
anchors.fill: parent
center: QtPositioning.coordinate(51.5, 0.125) // London
zoomLevel: 10
gesture.enabled: true
gesture.acceptedGestures: MapGestureArea.PinchGesture | MapGestureArea.PanGesture
// Needs to come first, otherwise MouseAreas in the MapItemViews don't get clicked event first
// Setting z doesn't seem to work

View File

@ -64,6 +64,8 @@ Item {
anchors.fill: parent
center: QtPositioning.coordinate(51.5, 0.125) // London
zoomLevel: 10
gesture.enabled: true
gesture.acceptedGestures: MapGestureArea.PinchGesture | MapGestureArea.PanGesture
// Tracks first, so drawn under other items
MapItemView {

View File

@ -49,6 +49,8 @@ Item {
plugin: mapPlugin
center: QtPositioning.coordinate(51.5, 0.125) // London
zoomLevel: 10
gesture.enabled: true
gesture.acceptedGestures: MapGestureArea.PinchGesture | MapGestureArea.PanGesture
MapItemView {
model: vorModel