FlightDisplayViewMap.qml 21.2 KB
Newer Older
1 2
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4 5 6 7 8
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/
9 10


11 12 13 14 15
import QtQuick                      2.11
import QtQuick.Controls             2.4
import QtLocation                   5.3
import QtPositioning                5.3
import QtQuick.Dialogs              1.2
16 17

import QGroundControl               1.0
18 19 20
import QGroundControl.Airspace      1.0
import QGroundControl.Controllers   1.0
import QGroundControl.Controls      1.0
21 22 23
import QGroundControl.FlightDisplay 1.0
import QGroundControl.FlightMap     1.0
import QGroundControl.Palette       1.0
24
import QGroundControl.ScreenTools   1.0
25 26 27
import QGroundControl.Vehicle       1.0

FlightMap {
28 29 30 31
    id:                         flightMap
    mapName:                    _mapName
    allowGCSLocationCenter:     !userPanned
    allowVehicleLocationCenter: !_keepVehicleCentered
32
    planView:                   false
33 34
    zoomLevel:                  QGroundControl.flightMapZoom
    center:                     QGroundControl.flightMapPosition
35

36
    property var    guidedActionsController
Don Gagne's avatar
Don Gagne committed
37
    property var    flightWidgets
38
    property var    rightPanelWidth
39
    property var    planMasterController
40
    property alias  scaleState:                 mapScale.state
41
    property rect   centerViewport:             Qt.rect(0, 0, width, height)
42
    property bool   mainWindowIsMap:            true
43

44 45 46
    property var    _planMasterController:      planMasterController
    property var    _geoFenceController:        planMasterController.geoFenceController
    property var    _rallyPointController:      planMasterController.rallyPointController
Gus Grubba's avatar
Gus Grubba committed
47
    property var    _activeVehicleCoordinate:   activeVehicle ? activeVehicle.coordinate : QtPositioning.coordinate()
48
    property real   _toolButtonTopMargin:       parent.height - mainWindow.height + (ScreenTools.defaultFontPixelHeight / 2)
Gus Grubba's avatar
Gus Grubba committed
49
    property bool   _airspaceEnabled:           QGroundControl.airmapSupported ? (QGroundControl.settingsManager.airMapSettings.enableAirMap.rawValue && QGroundControl.airspaceManager.connected): false
50 51
    property var    _flyViewSettings:           QGroundControl.settingsManager.flyViewSettings
    property bool   _keepMapCenteredOnVehicle:  _flyViewSettings.keepMapCenteredOnVehicle.rawValue
52

53
    property bool   _disableVehicleTracking:    false
54
    property bool   _keepVehicleCentered:       mainWindowIsMap ? false : true
55
    property bool   _pipping:                   false
56

57
    function updateAirspace(reset) {
58
        if(_airspaceEnabled) {
59 60 61
            var coordinateNW = flightMap.toCoordinate(Qt.point(0,0), false /* clipToViewPort */)
            var coordinateSE = flightMap.toCoordinate(Qt.point(width,height), false /* clipToViewPort */)
            if(coordinateNW.isValid && coordinateSE.isValid) {
62
                QGroundControl.airspaceManager.setROI(coordinateNW, coordinateSE, false /*planView*/, reset)
63
            }
64
        }
65 66
    }

67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
    function pipIn() {
        if(QGroundControl.flightMapZoom > 3) {
            _pipping = true;
            zoomLevel = QGroundControl.flightMapZoom - 3
            _pipping = false;
        }
    }

    function pipOut() {
        _pipping = true;
        zoomLevel = QGroundControl.flightMapZoom
        _pipping = false;
    }

    function adjustMapSize() {
82
        if(mainWindowIsMap)
83 84 85 86 87
            pipOut()
        else
            pipIn()
    }

88 89
    // Track last known map position and zoom from Fly view in settings

90 91 92 93 94 95 96
    onVisibleChanged: {
        if(visible) {
            adjustMapSize()
            center    = QGroundControl.flightMapPosition
        }
    }

97
    onZoomLevelChanged: {
98 99 100 101
        if(!_pipping) {
            QGroundControl.flightMapZoom = zoomLevel
            updateAirspace(false)
        }
102 103
    }
    onCenterChanged: {
104
        QGroundControl.flightMapPosition = center
105
        updateAirspace(false)
106
    }
107

108
    // When the user pans the map we stop responding to vehicle coordinate updates until the panRecenterTimer fires
109
    onUserPannedChanged: {
DonLakeFlyer's avatar
DonLakeFlyer committed
110 111 112 113 114
        if (userPanned) {
            userPanned = false
            _disableVehicleTracking = true
            panRecenterTimer.restart()
        }
115 116
    }

Gus Grubba's avatar
Gus Grubba committed
117
    on_AirspaceEnabledChanged: {
118
        updateAirspace(true)
Gus Grubba's avatar
Gus Grubba committed
119 120
    }

121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
    function pointInRect(point, rect) {
        return point.x > rect.x &&
                point.x < rect.x + rect.width &&
                point.y > rect.y &&
                point.y < rect.y + rect.height;
    }

    property real _animatedLatitudeStart
    property real _animatedLatitudeStop
    property real _animatedLongitudeStart
    property real _animatedLongitudeStop
    property real animatedLatitude
    property real animatedLongitude

    onAnimatedLatitudeChanged: flightMap.center = QtPositioning.coordinate(animatedLatitude, animatedLongitude)
    onAnimatedLongitudeChanged: flightMap.center = QtPositioning.coordinate(animatedLatitude, animatedLongitude)

    NumberAnimation on animatedLatitude { id: animateLat; from: _animatedLatitudeStart; to: _animatedLatitudeStop; duration: 1000 }
    NumberAnimation on animatedLongitude { id: animateLong; from: _animatedLongitudeStart; to: _animatedLongitudeStop; duration: 1000 }

    function animatedMapRecenter(fromCoord, toCoord) {
        _animatedLatitudeStart = fromCoord.latitude
        _animatedLongitudeStart = fromCoord.longitude
        _animatedLatitudeStop = toCoord.latitude
        _animatedLongitudeStop = toCoord.longitude
        animateLat.start()
        animateLong.start()
    }

    function recenterNeeded() {
151
        var vehiclePoint = flightMap.fromCoordinate(_activeVehicleCoordinate, false /* clipToViewport */)
152 153
        var toolStripRightEdge = mapFromItem(toolStrip, toolStrip.x, 0).x + toolStrip.width
        var instrumentsWidth = 0
154
        if (QGroundControl.corePlugin.options.instrumentWidget && QGroundControl.corePlugin.options.instrumentWidget.widgetPosition === CustomInstrumentWidget.POS_TOP_RIGHT) {
155 156 157 158
            // Assume standard instruments
            instrumentsWidth = flightDisplayViewWidgets.getPreferredInstrumentWidth()
        }
        var centerViewport = Qt.rect(toolStripRightEdge, 0, width - toolStripRightEdge - instrumentsWidth, height)
159
        return !pointInRect(vehiclePoint, centerViewport)
160 161 162
    }

    function updateMapToVehiclePosition() {
163
        // We let FlightMap handle first vehicle position
164
        if (!_keepMapCenteredOnVehicle && firstVehiclePositionReceived && _activeVehicleCoordinate.isValid && !_disableVehicleTracking) {
165
            if (_keepVehicleCentered) {
166
                flightMap.center = _activeVehicleCoordinate
167
            } else {
DonLakeFlyer's avatar
DonLakeFlyer committed
168
                if (firstVehiclePositionReceived && recenterNeeded()) {
169
                    animatedMapRecenter(flightMap.center, _activeVehicleCoordinate)
170 171
                }
            }
172 173 174
        }
    }

175 176 177 178 179 180
    on_ActiveVehicleCoordinateChanged: {
        if (_keepMapCenteredOnVehicle && _activeVehicleCoordinate.isValid && !_disableVehicleTracking) {
            flightMap.center = _activeVehicleCoordinate
        }
    }

181
    Timer {
182 183 184
        id:         panRecenterTimer
        interval:   10000
        running:    false
185
        onTriggered: {
186
            _disableVehicleTracking = false
187
            updateMapToVehiclePosition()
188 189 190
        }
    }

191 192 193 194 195 196 197
    Timer {
        interval:       500
        running:        true
        repeat:         true
        onTriggered:    updateMapToVehiclePosition()
    }

198
    QGCMapPalette { id: mapPal; lightColors: isSatelliteMap }
Don Gagne's avatar
Don Gagne committed
199

200
    Connections {
201
        target:                 _missionController
202
        ignoreUnknownSignals:   true
203
        onNewItemsFromVehicle: {
204
            var visualItems = _missionController.visualItems
205
            if (visualItems && visualItems.count !== 1) {
206
                mapFitFunctions.fitMapViewportToMissionItems()
207
                firstVehiclePositionReceived = true
208 209
            }
        }
210 211
    }

Don Gagne's avatar
Don Gagne committed
212
    MapFitFunctions {
213
        id:                         mapFitFunctions // The name for this id cannot be changed without breaking references outside of this code. Beware!
214
        map:                        flightMap
Don Gagne's avatar
Don Gagne committed
215
        usePlannedHomePosition:     false
216
        planMasterController:       _planMasterController
Gus Grubba's avatar
Gus Grubba committed
217
        property real leftToolWidth: toolStrip.x + toolStrip.width
Don Gagne's avatar
Don Gagne committed
218
    }
219

220 221 222 223 224 225
    // Add trajectory lines to the map
    MapPolyline {
        id:         trajectoryPolyline
        line.width: 3
        line.color: "red"
        z:          QGroundControl.zOrderTrajectoryLines
226
        visible:    mainWindowIsMap
227 228 229 230 231 232 233 234 235 236 237

        Connections {
            target:                 QGroundControl.multiVehicleManager
            onActiveVehicleChanged: trajectoryPolyline.path = activeVehicle ? activeVehicle.trajectoryPoints.list() : []
        }

        Connections {
            target:                 activeVehicle ? activeVehicle.trajectoryPoints : null
            onPointAdded:           trajectoryPolyline.addCoordinate(coordinate)
            onUpdateLastPoint:      trajectoryPolyline.replaceCoordinate(trajectoryPolyline.pathLength() - 1, coordinate)
            onPointsCleared:        trajectoryPolyline.path = []
Don Gagne's avatar
Don Gagne committed
238
        }
239 240 241 242
    }

    // Add the vehicles to the map
    MapItemView {
243
        model: QGroundControl.multiVehicleManager.vehicles
DonLakeFlyer's avatar
DonLakeFlyer committed
244
        delegate: VehicleMapItem {
Don Gagne's avatar
Don Gagne committed
245 246
            vehicle:        object
            coordinate:     object.coordinate
247
            map:            flightMap
248
            size:           mainWindowIsMap ? ScreenTools.defaultFontPixelHeight * 3 : ScreenTools.defaultFontPixelHeight
DonLakeFlyer's avatar
DonLakeFlyer committed
249
            z:              QGroundControl.zOrderVehicles
Don Gagne's avatar
Don Gagne committed
250
        }
251 252
    }

253 254
    // Add ADSB vehicles to the map
    MapItemView {
255
        model: QGroundControl.adsbVehicleManager.adsbVehicles
256 257 258
        delegate: VehicleMapItem {
            coordinate:     object.coordinate
            altitude:       object.altitude
259
            callsign:       object.callsign
260
            heading:        object.heading
Gus Grubba's avatar
Gus Grubba committed
261
            alert:          object.alert
262 263 264 265 266
            map:            flightMap
            z:              QGroundControl.zOrderVehicles
        }
    }

267 268 269 270 271
    // Add the items associated with each vehicles flight plan to the map
    Repeater {
        model: QGroundControl.multiVehicleManager.vehicles

        PlanMapItems {
272
            map:                    flightMap
273
            largeMapView:           mainWindowIsMap
274 275
            planMasterController:   _planMasterController
            vehicle:                _vehicle
276 277 278 279 280 281 282 283

            property var _vehicle: object

            PlanMasterController {
                id: masterController
                Component.onCompleted: startStaticActiveVehicle(object)
            }
        }
284 285
    }

286
    MapItemView {
287
        model: mainWindowIsMap ? _missionController.directionArrows : undefined
288 289 290 291 292 293 294 295 296

        delegate: MapLineArrow {
            fromCoord:      object ? object.coordinate1 : undefined
            toCoord:        object ? object.coordinate2 : undefined
            arrowPosition:  2
            z:              QGroundControl.zOrderWaypointLines
        }
    }

297 298 299
    // Allow custom builds to add map items
    CustomMapItems {
        map:            flightMap
300
        largeMapView:   mainWindowIsMap
301 302
    }

303 304
    GeoFenceMapVisuals {
        map:                    flightMap
305
        myGeoFenceController:   _geoFenceController
306
        interactive:            false
307
        planView:               false
Gus Grubba's avatar
Gus Grubba committed
308
        homePosition:           activeVehicle && activeVehicle.homePosition.isValid ? activeVehicle.homePosition :  QtPositioning.coordinate()
309 310
    }

311 312
    // Rally points on map
    MapItemView {
313
        model: _rallyPointController.points
314 315 316

        delegate: MapQuickItem {
            id:             itemIndicator
317 318
            anchorPoint.x:  sourceItem.anchorPointX
            anchorPoint.y:  sourceItem.anchorPointY
319 320 321 322 323 324 325 326 327 328
            coordinate:     object.coordinate
            z:              QGroundControl.zOrderMapItems

            sourceItem: MissionItemIndexLabel {
                id:         itemIndexLabel
                label:      qsTr("R", "rally point map item label")
            }
        }
    }

DonLakeFlyer's avatar
DonLakeFlyer committed
329 330
    // Camera trigger points
    MapItemView {
Gus Grubba's avatar
Gus Grubba committed
331
        model: activeVehicle ? activeVehicle.cameraTriggerPoints : 0
DonLakeFlyer's avatar
DonLakeFlyer committed
332 333 334 335 336 337 338

        delegate: CameraTriggerIndicator {
            coordinate:     object.coordinate
            z:              QGroundControl.zOrderTopMost
        }
    }

339
    // GoTo Location visuals
Don Gagne's avatar
Don Gagne committed
340
    MapQuickItem {
341 342
        id:             gotoLocationItem
        visible:        false
Don Gagne's avatar
Don Gagne committed
343
        z:              QGroundControl.zOrderMapItems
344 345
        anchorPoint.x:  sourceItem.anchorPointX
        anchorPoint.y:  sourceItem.anchorPointY
Don Gagne's avatar
Don Gagne committed
346
        sourceItem: MissionItemIndexLabel {
DonLakeFlyer's avatar
DonLakeFlyer committed
347 348
            checked:    true
            index:      -1
349
            label:      qsTr("Go here", "Go to location waypoint")
Don Gagne's avatar
Don Gagne committed
350
        }
351

Gus Grubba's avatar
Gus Grubba committed
352
        property bool inGotoFlightMode: activeVehicle ? activeVehicle.flightMode === activeVehicle.gotoFlightMode : false
353 354

        onInGotoFlightModeChanged: {
355
            if (!inGotoFlightMode && gotoLocationItem.visible) {
356
                // Hide goto indicator when vehicle falls out of guided mode
357
                gotoLocationItem.visible = false
358 359 360
            }
        }

Gus Grubba's avatar
Gus Grubba committed
361 362 363 364
        Connections {
            target: mainWindow
            onActiveVehicleChanged: {
                if (!activeVehicle) {
365
                    gotoLocationItem.visible = false
Gus Grubba's avatar
Gus Grubba committed
366
                }
367 368 369
            }
        }

370 371 372 373
        function show(coord) {
            gotoLocationItem.coordinate = coord
            gotoLocationItem.visible = true
        }
374

375 376 377 378
        function hide() {
            gotoLocationItem.visible = false
        }

379 380 381 382 383 384 385 386
        function actionConfirmed() {
            // We leave the indicator visible. The handling for onInGuidedModeChanged will hide it.
        }

        function actionCancelled() {
            hide()
        }
    }
387

388
    // Orbit editing visuals
389
    QGCMapCircleVisuals {
390 391 392 393
        id:             orbitMapCircle
        mapControl:     parent
        mapCircle:      _mapCircle
        visible:        false
394

395 396
        property alias center:              _mapCircle.center
        property alias clockwiseRotation:   _mapCircle.clockwiseRotation
397 398
        readonly property real defaultRadius: 30

Gus Grubba's avatar
Gus Grubba committed
399 400 401 402
        Connections {
            target: mainWindow
            onActiveVehicleChanged: {
                if (!activeVehicle) {
403
                    orbitMapCircle.visible = false
Gus Grubba's avatar
Gus Grubba committed
404
                }
405 406 407
            }
        }

408
        function show(coord) {
DonLakeFlyer's avatar
DonLakeFlyer committed
409
            _mapCircle.radius.rawValue = defaultRadius
410 411 412 413 414 415 416 417
            orbitMapCircle.center = coord
            orbitMapCircle.visible = true
        }

        function hide() {
            orbitMapCircle.visible = false
        }

418 419 420 421 422 423 424 425 426
        function actionConfirmed() {
            // Live orbit status is handled by telemetry so we hide here and telemetry will show again.
            hide()
        }

        function actionCancelled() {
            hide()
        }

DonLakeFlyer's avatar
DonLakeFlyer committed
427 428 429 430
        function radius() {
            return _mapCircle.radius.rawValue
        }

431 432 433 434 435
        Component.onCompleted: guidedActionsController.orbitMapCircle = orbitMapCircle

        QGCMapCircle {
            id:                 _mapCircle
            interactive:        true
DonLakeFlyer's avatar
DonLakeFlyer committed
436
            radius.rawValue:    30
437 438
            showRotation:       true
            clockwiseRotation:  true
439 440 441
        }
    }

Gus Grubba's avatar
Gus Grubba committed
442 443 444
    // ROI Location visuals
    MapQuickItem {
        id:             roiLocationItem
445
        visible:        activeVehicle && activeVehicle.isROIEnabled
Gus Grubba's avatar
Gus Grubba committed
446 447 448 449 450 451 452 453 454
        z:              QGroundControl.zOrderMapItems
        anchorPoint.x:  sourceItem.anchorPointX
        anchorPoint.y:  sourceItem.anchorPointY
        sourceItem: MissionItemIndexLabel {
            checked:    true
            index:      -1
            label:      qsTr("ROI here", "Make this a Region Of Interest")
        }

455
        //-- Visibilty controlled by actual state
Gus Grubba's avatar
Gus Grubba committed
456 457 458 459 460 461 462 463 464 465 466 467 468 469
        function show(coord) {
            roiLocationItem.coordinate = coord
        }

        function hide() {
        }

        function actionConfirmed() {
        }

        function actionCancelled() {
        }
    }

470
    // Orbit telemetry visuals
471
    QGCMapCircleVisuals {
472
        id:             orbitTelemetryCircle
473
        mapControl:     parent
Gus Grubba's avatar
Gus Grubba committed
474 475
        mapCircle:      activeVehicle ? activeVehicle.orbitMapCircle : null
        visible:        activeVehicle ? activeVehicle.orbitActive : false
476 477
    }

478 479 480 481
    MapQuickItem {
        id:             orbitCenterIndicator
        anchorPoint.x:  sourceItem.anchorPointX
        anchorPoint.y:  sourceItem.anchorPointY
Gus Grubba's avatar
Gus Grubba committed
482
        coordinate:     activeVehicle ? activeVehicle.orbitMapCircle.center : QtPositioning.coordinate()
483 484 485 486 487 488 489 490 491
        visible:        orbitTelemetryCircle.visible

        sourceItem: MissionItemIndexLabel {
            checked:    true
            index:      -1
            label:      qsTr("Orbit", "Orbit waypoint")
        }
    }

Don Gagne's avatar
Don Gagne committed
492
    // Handle guided mode clicks
493 494
    MouseArea {
        anchors.fill: parent
Don Gagne's avatar
Don Gagne committed
495

496
        QGCMenu {
DonLakeFlyer's avatar
DonLakeFlyer committed
497
            id: clickMenu
498
            property var coord
499
            QGCMenuItem {
DonLakeFlyer's avatar
DonLakeFlyer committed
500 501 502 503
                text:           qsTr("Go to location")
                visible:        guidedActionsController.showGotoLocation

                onTriggered: {
504 505
                    gotoLocationItem.show(clickMenu.coord)
                    orbitMapCircle.hide()
506
                    guidedActionsController.confirmAction(guidedActionsController.actionGoto, clickMenu.coord, gotoLocationItem)
DonLakeFlyer's avatar
DonLakeFlyer committed
507 508
                }
            }
509
            QGCMenuItem {
DonLakeFlyer's avatar
DonLakeFlyer committed
510 511
                text:           qsTr("Orbit at location")
                visible:        guidedActionsController.showOrbit
512

DonLakeFlyer's avatar
DonLakeFlyer committed
513
                onTriggered: {
514 515
                    orbitMapCircle.show(clickMenu.coord)
                    gotoLocationItem.hide()
516
                    guidedActionsController.confirmAction(guidedActionsController.actionOrbit, clickMenu.coord, orbitMapCircle)
DonLakeFlyer's avatar
DonLakeFlyer committed
517 518
                }
            }
Gus Grubba's avatar
Gus Grubba committed
519 520 521 522 523 524 525 526 527
            QGCMenuItem {
                text:           qsTr("ROI at location")
                visible:        guidedActionsController.showROI

                onTriggered: {
                    roiLocationItem.show(clickMenu.coord)
                    guidedActionsController.confirmAction(guidedActionsController.actionROI, clickMenu.coord, orbitMapCircle)
                }
            }
DonLakeFlyer's avatar
DonLakeFlyer committed
528 529
        }

Don Gagne's avatar
Don Gagne committed
530
        onClicked: {
DonLakeFlyer's avatar
DonLakeFlyer committed
531 532
            if (guidedActionsController.guidedUIVisible || (!guidedActionsController.showGotoLocation && !guidedActionsController.showOrbit)) {
                return
Gus Grubba's avatar
Gus Grubba committed
533
            }
534 535 536
            orbitMapCircle.hide()
            gotoLocationItem.hide()
            var clickCoord = flightMap.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */)
DonLakeFlyer's avatar
DonLakeFlyer committed
537
            if (guidedActionsController.showGotoLocation && guidedActionsController.showOrbit) {
538
                clickMenu.coord = clickCoord
DonLakeFlyer's avatar
DonLakeFlyer committed
539 540
                clickMenu.popup()
            } else if (guidedActionsController.showGotoLocation) {
DonLakeFlyer's avatar
DonLakeFlyer committed
541
                gotoLocationItem.show(clickCoord)
542
                guidedActionsController.confirmAction(guidedActionsController.actionGoto, clickCoord)
DonLakeFlyer's avatar
DonLakeFlyer committed
543
            } else if (guidedActionsController.showOrbit) {
544 545
                orbitMapCircle.show(clickCoord)
                guidedActionsController.confirmAction(guidedActionsController.actionOrbit, clickCoord)
Don Gagne's avatar
Don Gagne committed
546 547
            }
        }
548
    }
549 550

    MapScale {
551
        id:                     mapScale
552
        anchors.right:          parent.right
553 554
        anchors.margins:        _toolsMargin
        anchors.topMargin:      _toolsMargin + state === "bottomMode" ? 0 : ScreenTools.toolbarHeight
555
        mapControl:             flightMap
556
        buttonsOnLeft:          false
557
        visible:                !ScreenTools.isTinyScreen && QGroundControl.corePlugin.options.enableMapScale && mainWindowIsMap
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576
        state:                  "bottomMode"
        states: [
            State {
                name:   "topMode"
                AnchorChanges {
                    target:                 mapScale
                    anchors.top:            parent.top
                    anchors.bottom:         undefined
                }
            },
            State {
                name:   "bottomMode"
                AnchorChanges {
                    target:                 mapScale
                    anchors.top:            undefined
                    anchors.bottom:         parent.bottom
                }
            }
        ]
577
    }
578

579
    // Airspace overlap support
580
    MapItemView {
581
        model:              _airspaceEnabled && QGroundControl.settingsManager.airMapSettings.enableAirspace && QGroundControl.airspaceManager.airspaceVisible ? QGroundControl.airspaceManager.airspaces.circles : []
582 583 584
        delegate: MapCircle {
            center:         object.center
            radius:         object.radius
585
            color:          object.color
Gus Grubba's avatar
Gus Grubba committed
586 587
            border.color:   object.lineColor
            border.width:   object.lineWidth
588 589 590 591
        }
    }

    MapItemView {
592
        model:              _airspaceEnabled && QGroundControl.settingsManager.airMapSettings.enableAirspace && QGroundControl.airspaceManager.airspaceVisible ? QGroundControl.airspaceManager.airspaces.polygons : []
593 594
        delegate: MapPolygon {
            path:           object.polygon
595
            color:          object.color
Gus Grubba's avatar
Gus Grubba committed
596 597
            border.color:   object.lineColor
            border.width:   object.lineWidth
598 599
        }
    }
600

601
}