Fix location delegates

- Mark OSMLocationPlugina as singleton in cmake
- Use this plugin for the LocationChooser
This commit is contained in:
Tobias Fella
2024-03-29 13:23:30 +01:00
parent 878eb48cb0
commit 92351edcd0
6 changed files with 30 additions and 41 deletions

View File

@@ -29,17 +29,22 @@ Kirigami.Page {
map.zoomLevel: LocationHelper.zoomToFit(LocationHelper.unite(locationsModel.boundingBox, liveLocationsModel.boundingBox), mapView.width, mapView.height)
MapItemView {
Component.onCompleted: mapView.map.addMapItemView(this)
anchors.fill: parent
model: LocationsModel {
id: locationsModel
room: root.room
}
delegate: LocationMapItem {
isLive: true
isLive: false
heading: NaN
}
}
MapItemView {
Component.onCompleted: mapView.map.addMapItemView(this)
anchors.fill: parent
model: LiveLocationsModel {
id: liveLocationsModel
room: root.room
@@ -49,7 +54,7 @@ Kirigami.Page {
Kirigami.PlaceholderMessage {
text: i18n("There are no locations shared in this room.")
visible: mapView.mapItems.length === 0
visible: mapView.map.mapItems.length === 0
anchors.centerIn: parent
}
Connections {