6import QGroundControl.Controls
7import QGroundControl.FlightMap
9// Allow custom builds to add visual items associated with the Flight Plan to the map
11 property var map ///< Map control to show items on
12 property bool largeMapView ///< true: map takes up entire view, false: map is in small window
15 model: QGroundControl.corePlugin.customMapItems
18 property var _customObject
20 Component.onCompleted: {
21 var controlUrl = object.url
22 if (controlUrl !== "") {
23 var component = Qt.createComponent(controlUrl);
24 if (component.status === Component.Ready) {
25 _customObject = component.createObject(map, { "customMapObject": object })
27 map.addMapItem(_customObject)
30 console.log("Component creation failed", component.errorString())
35 Component.onDestruction: {
37 _customObject.destroy()