1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-09-01 04:37:52 -04:00

Add colour tracks to map.

This commit is contained in:
srcejon 2025-06-04 18:11:52 +01:00
parent 2aa2ad27da
commit 1304926162
2 changed files with 187 additions and 170 deletions

View File

@ -16,6 +16,7 @@ Item {
property bool lightIcons property bool lightIcons
property variant guiPtr property variant guiPtr
property bool smoothing property bool smoothing
property bool showContainmentRadius
function createMap(pluginParameters, requestedMap, gui) { function createMap(pluginParameters, requestedMap, gui) {
requestedMapType = requestedMap requestedMapType = requestedMap
@ -93,12 +94,6 @@ Item {
delegate: airportComponent delegate: airportComponent
} }
// This needs to be before aircraftComponent MapItemView, so it's drawn underneath
MapItemView {
model: aircraftModel
delegate: aircraftPathComponent
}
MapItemView { MapItemView {
model: aircraftModel model: aircraftModel
delegate: aircraftComponent delegate: aircraftComponent
@ -234,6 +229,19 @@ Item {
Component { Component {
id: aircraftComponent 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 { MapQuickItem {
id: aircraft id: aircraft
anchorPoint.x: image.width/2 anchorPoint.x: image.width/2
@ -325,6 +333,7 @@ Item {
} }
} }
} }
}
Component { Component {
id: airportComponent id: airportComponent

View File

@ -16,6 +16,7 @@ Item {
property bool lightIcons property bool lightIcons
property variant guiPtr property variant guiPtr
property bool smoothing property bool smoothing
property bool showContainmentRadius
function createMap(pluginParameters, requestedMap, gui) { function createMap(pluginParameters, requestedMap, gui) {
requestedMapType = requestedMap requestedMapType = requestedMap
@ -101,13 +102,6 @@ Item {
parent: mapView.map parent: mapView.map
} }
// This needs to be before aircraftComponent MapItemView, so it's drawn underneath
MapItemView {
model: aircraftModel
delegate: aircraftPathComponent
parent: mapView.map
}
MapItemView { MapItemView {
model: aircraftModel model: aircraftModel
delegate: aircraftComponent delegate: aircraftComponent
@ -238,13 +232,26 @@ Item {
id: aircraftPathComponent id: aircraftPathComponent
MapPolyline { MapPolyline {
line.width: 2 line.width: 2
line.color: 'gray' line.color: color
path: aircraftPath path: coordinates
} }
} }
Component { Component {
id: aircraftComponent 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 { MapQuickItem {
id: aircraft id: aircraft
anchorPoint.x: image.width/2 anchorPoint.x: image.width/2
@ -339,6 +346,7 @@ Item {
} }
} }
} }
}
Component { Component {
id: airportComponent id: airportComponent