Unify map markers on the full screen and room maps as well
This commit is contained in:
@@ -11,7 +11,10 @@ import org.kde.kirigami 2.15 as Kirigami
|
||||
ApplicationWindow {
|
||||
id: root
|
||||
|
||||
required property var content
|
||||
required property real latitude
|
||||
required property real longitude
|
||||
required property string asset
|
||||
required property var author
|
||||
|
||||
flags: Qt.FramelessWindowHint | Qt.WA_TranslucentBackground
|
||||
visibility: Qt.WindowFullScreen
|
||||
@@ -32,20 +35,15 @@ ApplicationWindow {
|
||||
Map {
|
||||
id: map
|
||||
anchors.fill: parent
|
||||
property string latlong: root.content.geo_uri.split(':')[1]
|
||||
property string latitude: latlong.split(',')[0]
|
||||
property string longitude: latlong.split(',')[1]
|
||||
center: QtPositioning.coordinate(latitude, longitude)
|
||||
center: QtPositioning.coordinate(root.latitude, root.longitude)
|
||||
zoomLevel: 15
|
||||
plugin: OsmLocationPlugin.plugin
|
||||
MapCircle {
|
||||
radius: 1500 / map.zoomLevel
|
||||
color: Kirigami.Theme.highlightColor
|
||||
border.color: Kirigami.Theme.linkColor
|
||||
border.width: Kirigami.Units.devicePixelRatio * 2
|
||||
smooth: true
|
||||
opacity: 0.25
|
||||
center: QtPositioning.coordinate(map.latitude, map.longitude)
|
||||
LocationMapItem {
|
||||
latitude: root.latitude
|
||||
longitude: root.longitude
|
||||
asset: root.asset
|
||||
author: root.author
|
||||
isLive: true
|
||||
}
|
||||
onCopyrightLinkActivated: {
|
||||
Qt.openUrlExternally(link)
|
||||
|
||||
@@ -27,22 +27,8 @@ Kirigami.Page {
|
||||
model: LocationsModel {
|
||||
room: locationsPage.room
|
||||
}
|
||||
delegate: MapQuickItem {
|
||||
id: point
|
||||
|
||||
required property var longitude
|
||||
required property var latitude
|
||||
required property string text
|
||||
anchorPoint.x: icon.width / 2
|
||||
anchorPoint.y: icon.height / 2
|
||||
coordinate: QtPositioning.coordinate(point.latitude, point.longitude)
|
||||
autoFadeIn: false
|
||||
sourceItem: Kirigami.Icon {
|
||||
id: icon
|
||||
width: height
|
||||
height: Kirigami.Units.iconSizes.medium
|
||||
source: "flag-blue"
|
||||
}
|
||||
delegate: LocationMapItem {
|
||||
isLive: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ TimelineContainer {
|
||||
* a user's location.
|
||||
*/
|
||||
required property string asset
|
||||
required property var content
|
||||
|
||||
ColumnLayout {
|
||||
Layout.maximumWidth: root.contentMaxWidth
|
||||
@@ -63,7 +62,7 @@ TimelineContainer {
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onTapped: {
|
||||
let map = fullScreenMap.createObject(parent, {content: root.content});
|
||||
let map = fullScreenMap.createObject(parent, {latitude: root.latitude, longitude: root.longitude, asset: root.asset, author: root.author});
|
||||
map.open()
|
||||
}
|
||||
onLongPressed: openMessageContext("")
|
||||
|
||||
Reference in New Issue
Block a user