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:
parent
2aa2ad27da
commit
1304926162
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user