Fix maps
In Qt6, Map just shows a static map, while MapView allows for zooming, moving, etc.
This commit is contained in:
@@ -25,16 +25,15 @@ MessageDelegate {
|
||||
id: liveLocationModel
|
||||
eventId: root.eventId
|
||||
}
|
||||
Map {
|
||||
id: map
|
||||
MapView {
|
||||
id: mapView
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: root.contentMaxWidth / 16 * 9
|
||||
|
||||
center: QtPositioning.coordinate(liveLocationModel.boundingBox.y, liveLocationModel.boundingBox.x)
|
||||
zoomLevel: 15
|
||||
map.center: QtPositioning.coordinate(liveLocationModel.boundingBox.y, liveLocationModel.boundingBox.x)
|
||||
map.zoomLevel: 15
|
||||
|
||||
plugin: OsmLocationPlugin.plugin
|
||||
onCopyrightLinkActivated: Qt.openUrlExternally(link)
|
||||
map.plugin: OsmLocationPlugin.plugin
|
||||
|
||||
MapItemView {
|
||||
model: liveLocationModel
|
||||
@@ -53,6 +52,12 @@ MessageDelegate {
|
||||
acceptedButtons: Qt.RightButton
|
||||
onTapped: openMessageContext("")
|
||||
}
|
||||
Connections {
|
||||
target: mapView.map
|
||||
function onCopyrightLinkActivated() {
|
||||
Qt.openUrlExternally(link)
|
||||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: fullScreenMap
|
||||
|
||||
Reference in New Issue
Block a user