Add colour tracks to map.

pull/2465/head
srcejon 2025-06-04 18:11:52 +01:00
rodzic 2aa2ad27da
commit 1304926162
2 zmienionych plików z 187 dodań i 170 usunięć

Wyświetl plik

@ -16,6 +16,7 @@ Item {
property bool lightIcons
property variant guiPtr
property bool smoothing
property bool showContainmentRadius
function createMap(pluginParameters, requestedMap, gui) {
requestedMapType = requestedMap
@ -93,12 +94,6 @@ Item {
delegate: airportComponent
}
// This needs to be before aircraftComponent MapItemView, so it's drawn underneath
MapItemView {
model: aircraftModel
delegate: aircraftPathComponent
}
MapItemView {
model: aircraftModel
delegate: aircraftComponent
@ -234,6 +229,19 @@ Item {
Component {
id: aircraftComponent
MapItemGroup {
MapItemView {
model: aircraftPathModel
delegate: aircraftPathComponent
}
MapCircle {
id: containmentRadiusCircle
border.width: 1
border.color: "red"
radius: containmentRadius
center: position
visible: showContainmentRadius && (containmentRadius > 0)
}
MapQuickItem {
id: aircraft
anchorPoint.x: image.width/2
@ -325,6 +333,7 @@ Item {
}
}
}
}
Component {
id: airportComponent

Wyświetl plik

@ -16,6 +16,7 @@ Item {
property bool lightIcons
property variant guiPtr
property bool smoothing
property bool showContainmentRadius
function createMap(pluginParameters, requestedMap, gui) {
requestedMapType = requestedMap
@ -101,13 +102,6 @@ Item {
parent: mapView.map
}
// This needs to be before aircraftComponent MapItemView, so it's drawn underneath
MapItemView {
model: aircraftModel
delegate: aircraftPathComponent
parent: mapView.map
}
MapItemView {
model: aircraftModel
delegate: aircraftComponent
@ -238,13 +232,26 @@ Item {
id: aircraftPathComponent
MapPolyline {
line.width: 2
line.color: 'gray'
path: aircraftPath
line.color: color
path: coordinates
}
}
Component {
id: aircraftComponent
MapItemGroup {
MapItemView {
model: aircraftPathModel
delegate: aircraftPathComponent
}
MapCircle {
id: containmentRadiusCircle
border.width: 1
border.color: "red"
radius: containmentRadius
center: position
visible: showContainmentRadius && (containmentRadius > 0)
}
MapQuickItem {
id: aircraft
anchorPoint.x: image.width/2
@ -339,6 +346,7 @@ Item {
}
}
}
}
Component {
id: airportComponent