10import QGroundControl.Controls
11import QGroundControl.FlightMap
12import QGroundControl.FactControls
16 allowGCSLocationCenter: true
17 allowVehicleLocationCenter: false
20 property var tileSet: null
22 property string mapKey: "lastMapType"
24 property var _settingsManager: QGroundControl.settingsManager
25 property var _settings: _settingsManager ? _settingsManager.offlineMapsSettings : null
26 property var _fmSettings: _settingsManager ? _settingsManager.flightMapSettings : null
27 property var _appSettings: _settingsManager.appSettings
28 property Fact _tiandituFact: _settingsManager ? _settingsManager.appSettings.tiandituToken : null
29 property Fact _mapboxFact: _settingsManager ? _settingsManager.appSettings.mapboxToken : null
30 property Fact _mapboxAccountFact: _settingsManager ? _settingsManager.appSettings.mapboxAccount : null
31 property Fact _mapboxStyleFact: _settingsManager ? _settingsManager.appSettings.mapboxStyle : null
32 property Fact _esriFact: _settingsManager ? _settingsManager.appSettings.esriToken : null
33 property Fact _customURLFact: _settingsManager ? _settingsManager.appSettings.customURL : null
34 property Fact _vworldFact: _settingsManager ? _settingsManager.appSettings.vworldToken : null
36 property string mapType: _fmSettings ? (_fmSettings.mapProvider.value + " " + _fmSettings.mapType.value) : ""
37 property bool isMapInteractive: false
38 property var savedCenter: undefined
39 property real savedZoom: 3
40 property string savedMapType: ""
41 property bool _showPreview: true
42 property bool _defaultSet: tileSet && tileSet.defaultSet
43 property real _margins: ScreenTools.defaultFontPixelWidth * 0.5
44 property real _buttonSize: ScreenTools.defaultFontPixelWidth * 12
45 property real _bigButtonSize: ScreenTools.defaultFontPixelWidth * 16
47 property bool _saveRealEstate: ScreenTools.isTinyScreen || ScreenTools.isShortScreen
48 property real _adjustableFontPointSize: _saveRealEstate ? ScreenTools.smallFontPointSize : ScreenTools.defaultFontPointSize
50 property var _mapAdjustedColor: _map.isSatelliteMap ? "white" : "black"
51 property bool _tooManyTiles: QGroundControl.mapEngineManager.tileCount > _maxTilesForDownload
52 property var _addNewSetViewObject: null
54 readonly property real minZoomLevel: 1
55 readonly property real maxZoomLevel: 20
56 readonly property real sliderTouchArea: ScreenTools.defaultFontPixelWidth * (ScreenTools.isTinyScreen ? 5 : (ScreenTools.isMobile ? 6 : 3))
58 readonly property int _maxTilesForDownload: _settings ? _settings.maxTilesForDownload.rawValue : 0
60 QGCPalette { id: qgcPal }
62 Component.onCompleted: {
63 QGroundControl.mapEngineManager.loadTileSets()
66 savedCenter = _map.toCoordinate(Qt.point(_map.width / 2, _map.height / 2), false /* clipToViewPort */)
67 settingsPage.enabled = false // Prevent mouse events from bleeding through to the settings page which is below this in hierarchy
70 Component.onDestruction: settingsPage.enabled = true
73 target: QGroundControl.mapEngineManager
74 onErrorMessageChanged: errorDialogFactory.open()
77 function handleChanges() {
78 if (isMapInteractive) {
81 var xr = _map.width.toFixed(0) - 1 // Must be within boundaries of visible map
82 var yr = _map.height.toFixed(0) - 1 // Must be within boundaries of visible map
83 var c0 = _map.toCoordinate(Qt.point(xl, yl), false /* clipToViewPort */)
84 var c1 = _map.toCoordinate(Qt.point(xr, yr), false /* clipToViewPort */)
85 QGroundControl.mapEngineManager.updateForCurrentView(c0.longitude, c0.latitude, c1.longitude, c1.latitude, _addNewSetViewObject.sliderMinZoom.value, _addNewSetViewObject.sliderMaxZoom.value, mapType)
89 function updateMap() {
90 for (var i = 0; i < _map.supportedMapTypes.length; i++) {
91 if (mapType === _map.supportedMapTypes[i].name) {
92 _map.activeMapType = _map.supportedMapTypes[i]
99 function addNewSet() {
100 _addNewSetViewObject = addNewSetViewComponent.createObject(_map)
101 isMapInteractive = true
102 mapType = _fmSettings.mapProvider.value + " " + _fmSettings.mapType.value
107 function showInfo() {
108 isMapInteractive = false
109 savedCenter = _map.toCoordinate(Qt.point(_map.width / 2, _map.height / 2), false /* clipToViewPort */)
110 savedZoom = _map.zoomLevel
111 savedMapType = mapType
112 if (!tileSet.defaultSet) {
113 mapType = tileSet.mapTypeStr
114 _map.center = midPoint(tileSet.topleftLat, tileSet.bottomRightLat, tileSet.topleftLon, tileSet.bottomRightLon)
115 //-- Delineate Set Region
116 var x0 = tileSet.topleftLon
117 var x1 = tileSet.bottomRightLon
118 var y0 = tileSet.topleftLat
119 var y1 = tileSet.bottomRightLat
120 mapBoundary.topLeft = QtPositioning.coordinate(y0, x0)
121 mapBoundary.bottomRight = QtPositioning.coordinate(y1, x1)
122 mapBoundary.visible = true
123 // Some times, for whatever reason, the bounding box is correct (around ETH for instance), but the rectangle is drawn across the planet.
124 // When that happens, the "_map.fitViewportToMapItems()" below makes the map to zoom to the entire earth.
125 //console.log("Map boundary: " + mapBoundary.topLeft + " " + mapBoundary.bottomRight)
126 _map.fitViewportToVisibleMapItems()
128 infoViewComponent.createObject(_map)
131 function toRadian(deg) {
132 return deg * Math.PI / 180
135 function toDegree(rad) {
136 return rad * 180 / Math.PI
139 function midPoint(lat1, lat2, lon1, lon2) {
140 var dLon = toRadian(lon2 - lon1);
141 lat1 = toRadian(lat1);
142 lat2 = toRadian(lat2);
143 lon1 = toRadian(lon1);
144 var Bx = Math.cos(lat2) * Math.cos(dLon);
145 var By = Math.cos(lat2) * Math.sin(dLon);
146 var lat3 = Math.atan2(Math.sin(lat1) + Math.sin(lat2), Math.sqrt((Math.cos(lat1) + Bx) * (Math.cos(lat1) + Bx) + By * By));
147 var lon3 = lon1 + Math.atan2(By, Math.cos(lat1) + Bx);
148 return QtPositioning.coordinate(toDegree(lat3), toDegree(lon3))
151 function resetMapToDefaults() {
152 _map.center = QGroundControl.flightMapPosition
153 _map.zoomLevel = QGroundControl.flightMapZoom
158 if(isMapInteractive) {
159 QGroundControl.mapEngineManager.saveSetting(mapKey, mapType)
163 property bool isSatelliteMap: activeMapType.name.indexOf("Satellite") > -1 || activeMapType.name.indexOf("Hybrid") > -1
169 color: Qt.rgba(1,0,0,0.05)
174 onCenterChanged: handleChanges()
175 onZoomLevelChanged: handleChanges()
176 onWidthChanged: handleChanges()
177 onHeightChanged: handleChanges()
180 anchors.leftMargin: ScreenTools.defaultFontPixelWidth / 2
181 anchors.bottomMargin: anchors.leftMargin
182 anchors.left: parent.left
183 anchors.bottom: parent.bottom
187 //-----------------------------------------------------------------
190 id: infoViewComponent
194 anchors.margins: ScreenTools.defaultFontPixelHeight
195 anchors.right: parent.right
196 anchors.verticalCenter: parent.verticalCenter
197 width: tileInfoColumn.width + (ScreenTools.defaultFontPixelWidth * 2)
198 height: tileInfoColumn.height + (ScreenTools.defaultFontPixelHeight * 2)
199 color: Qt.rgba(qgcPal.window.r, qgcPal.window.g, qgcPal.window.b, 0.85)
200 radius: ScreenTools.defaultFontPixelWidth * 0.5
202 property bool _extraButton: {
205 var curSel = tileSet;
206 return !_defaultSet && ((!curSel.complete && !curSel.downloading) || (!curSel.complete && curSel.downloading));
209 property real _labelWidth: ScreenTools.defaultFontPixelWidth * 10
210 property real _valueWidth: ScreenTools.defaultFontPixelWidth * 14
213 anchors.margins: ScreenTools.defaultFontPixelHeight * 0.5
214 spacing: ScreenTools.defaultFontPixelHeight * 0.5
215 anchors.centerIn: parent
217 anchors.left: parent.left
218 anchors.right: parent.right
219 wrapMode: Text.WordWrap
220 text: tileSet ? tileSet.name : ""
221 font.pointSize: _saveRealEstate ? ScreenTools.defaultFontPointSize : ScreenTools.mediumFontPointSize
222 horizontalAlignment: Text.AlignHCenter
227 anchors.left: parent.left
228 anchors.right: parent.right
229 visible: !_defaultSet
230 text: tileSet ? tileSet.name : ""
233 anchors.left: parent.left
234 anchors.right: parent.right
235 wrapMode: Text.WordWrap
238 if(tileSet.defaultSet)
239 return qsTr("System Wide Tile Cache");
241 return "(" + tileSet.mapTypeStr + ")"
245 horizontalAlignment: Text.AlignHCenter
249 spacing: ScreenTools.defaultFontPixelWidth
250 anchors.horizontalCenter: parent.horizontalCenter
251 visible: !_defaultSet && mapType !== QGroundControl.elevationProviderName
252 QGCLabel { text: qsTr("Zoom Levels:"); width: infoView._labelWidth; }
253 QGCLabel { text: tileSet ? (tileSet.minZoom + " - " + tileSet.maxZoom) : ""; horizontalAlignment: Text.AlignRight; width: infoView._valueWidth; }
256 spacing: ScreenTools.defaultFontPixelWidth
257 anchors.horizontalCenter: parent.horizontalCenter
258 visible: !_defaultSet
259 QGCLabel { text: qsTr("Total:"); width: infoView._labelWidth; }
260 QGCLabel { text: (tileSet ? tileSet.totalTileCountStr : "") + " (" + (tileSet ? tileSet.totalTilesSizeStr : "") + ")"; horizontalAlignment: Text.AlignRight; width: infoView._valueWidth; }
263 spacing: ScreenTools.defaultFontPixelWidth
264 anchors.horizontalCenter: parent.horizontalCenter
265 visible: tileSet && !_defaultSet && tileSet.uniqueTileCount > 0
266 QGCLabel { text: qsTr("Unique:"); width: infoView._labelWidth; }
267 QGCLabel { text: (tileSet ? tileSet.uniqueTileCountStr : "") + " (" + (tileSet ? tileSet.uniqueTileSizeStr : "") + ")"; horizontalAlignment: Text.AlignRight; width: infoView._valueWidth; }
271 spacing: ScreenTools.defaultFontPixelWidth
272 anchors.horizontalCenter: parent.horizontalCenter
273 visible: tileSet && !_defaultSet && !tileSet.complete
274 QGCLabel { text: qsTr("Downloaded:"); width: infoView._labelWidth; }
275 QGCLabel { text: (tileSet ? tileSet.savedTileCountStr : "") + " (" + (tileSet ? tileSet.savedTileSizeStr : "") + ")"; horizontalAlignment: Text.AlignRight; width: infoView._valueWidth; }
278 spacing: ScreenTools.defaultFontPixelWidth
279 anchors.horizontalCenter: parent.horizontalCenter
280 visible: tileSet && !_defaultSet && !tileSet.complete && tileSet.errorCount > 0
281 QGCLabel { text: qsTr("Error Count:"); width: infoView._labelWidth; }
282 QGCLabel { text: tileSet ? tileSet.errorCountStr : ""; horizontalAlignment: Text.AlignRight; width: infoView._valueWidth; }
284 //-- Default Tile Set
286 spacing: ScreenTools.defaultFontPixelWidth
287 anchors.horizontalCenter: parent.horizontalCenter
289 QGCLabel { text: qsTr("Size:"); width: infoView._labelWidth; }
290 QGCLabel { text: tileSet ? tileSet.savedTileSizeStr : ""; horizontalAlignment: Text.AlignRight; width: infoView._valueWidth; }
293 spacing: ScreenTools.defaultFontPixelWidth
294 anchors.horizontalCenter: parent.horizontalCenter
296 QGCLabel { text: qsTr("Tile Count:"); width: infoView._labelWidth; }
297 QGCLabel { text: tileSet ? tileSet.savedTileCountStr : ""; horizontalAlignment: Text.AlignRight; width: infoView._valueWidth; }
300 spacing: ScreenTools.defaultFontPixelWidth
301 anchors.horizontalCenter: parent.horizontalCenter
303 text: qsTr("Resume Download")
304 visible: tileSet && tileSet && !_defaultSet && (!tileSet.complete && !tileSet.downloading)
305 width: ScreenTools.defaultFontPixelWidth * 16
308 tileSet.resumeDownloadTask()
312 text: qsTr("Cancel Download")
313 visible: tileSet && tileSet && !_defaultSet && (!tileSet.complete && tileSet.downloading)
314 width: ScreenTools.defaultFontPixelWidth * 16
317 tileSet.cancelDownloadTask()
322 width: ScreenTools.defaultFontPixelWidth * (infoView._extraButton ? 6 : 10)
323 onClicked: deleteConfirmationDialogFactory.open()
324 enabled: tileSet ? (tileSet.savedTileSize > 0) : false
328 width: ScreenTools.defaultFontPixelWidth * (infoView._extraButton ? 6 : 10)
329 visible: !_defaultSet
330 enabled: editSetName.text !== ""
332 if (editSetName.text !== tileSet.name) {
333 QGroundControl.mapEngineManager.renameTileSet(tileSet, editSetName.text)
339 text: _defaultSet ? qsTr("Close") : qsTr("Cancel")
340 width: ScreenTools.defaultFontPixelWidth * (infoView._extraButton ? 6 : 10)
341 onClicked: _map.destroy()
349 id: addNewSetViewComponent
355 property var sliderMinZoom: sliderMinZoom
356 property var sliderMaxZoom: sliderMaxZoom
359 anchors.verticalCenter: parent.verticalCenter
360 anchors.leftMargin: _margins
361 anchors.left: parent.left
365 text: qsTr("Show zoom previews")
366 visible: !_showPreview
367 onClicked: _showPreview = !_showPreview
372 width: addNewSetView.width / 4
373 height: addNewSetView.height / 4
375 activeMapType: _map.activeMapType
376 zoomLevel: sliderMinZoom.value
377 visible: _showPreview
379 property bool isSatelliteMap: activeMapType.name.indexOf("Satellite") > -1 || activeMapType.name.indexOf("Hybrid") > -1
381 plugin: Plugin { name: "QGroundControl" }
384 anchors.leftMargin: ScreenTools.defaultFontPixelWidth / 2
385 anchors.bottomMargin: anchors.leftMargin
386 anchors.left: parent.left
387 anchors.bottom: parent.bottom
393 border.color: _mapAdjustedColor
397 anchors.centerIn: parent
399 text: qsTr("Min Zoom: %1").arg(sliderMinZoom.value)
403 onClicked: _showPreview = false
410 width: minZoomPreview.width
411 height: minZoomPreview.height
413 activeMapType: _map.activeMapType
414 zoomLevel: sliderMaxZoom.value
415 visible: _showPreview
417 property bool isSatelliteMap: activeMapType.name.indexOf("Satellite") > -1 || activeMapType.name.indexOf("Hybrid") > -1
419 plugin: Plugin { name: "QGroundControl" }
422 anchors.leftMargin: ScreenTools.defaultFontPixelWidth / 2
423 anchors.bottomMargin: anchors.leftMargin
424 anchors.left: parent.left
425 anchors.bottom: parent.bottom
431 border.color: _mapAdjustedColor
435 anchors.centerIn: parent
437 text: qsTr("Max Zoom: %1").arg(sliderMaxZoom.value)
441 onClicked: _showPreview = false
448 anchors.margins: ScreenTools.defaultFontPixelWidth
449 anchors.verticalCenter: parent.verticalCenter
450 anchors.right: parent.right
451 width: ScreenTools.defaultFontPixelWidth * (ScreenTools.isTinyScreen ? 24 : 28)
452 height: Math.min(parent.height - (anchors.margins * 2), addNewSetFlickable.y + addNewSetColumn.height + addNewSetLabel.anchors.margins)
453 color: Qt.rgba(qgcPal.window.r, qgcPal.window.g, qgcPal.window.b, 0.85)
454 radius: ScreenTools.defaultFontPixelWidth * 0.5
456 //-- Eat mouse events
463 anchors.margins: ScreenTools.defaultFontPixelHeight / 2
464 anchors.top: parent.top
465 anchors.left: parent.left
466 anchors.right: parent.right
467 wrapMode: Text.WordWrap
468 text: qsTr("Add New Set")
469 font.pointSize: _saveRealEstate ? ScreenTools.defaultFontPointSize : ScreenTools.mediumFontPointSize
470 horizontalAlignment: Text.AlignHCenter
474 id: addNewSetFlickable
475 anchors.leftMargin: ScreenTools.defaultFontPixelWidth
476 anchors.rightMargin: anchors.leftMargin
477 anchors.topMargin: ScreenTools.defaultFontPixelWidth / 3
478 anchors.bottomMargin: anchors.topMargin
479 anchors.top: addNewSetLabel.bottom
480 anchors.left: parent.left
481 anchors.right: parent.right
482 anchors.bottom: parent.bottom
484 contentHeight: addNewSetColumn.height
488 anchors.left: parent.left
489 anchors.right: parent.right
490 spacing: ScreenTools.defaultFontPixelHeight * (ScreenTools.isTinyScreen ? 0.25 : 0.5)
493 spacing: ScreenTools.isTinyScreen ? 0 : ScreenTools.defaultFontPixelHeight * 0.25
494 anchors.left: parent.left
495 anchors.right: parent.right
496 QGCLabel { text: qsTr("Name:") }
499 anchors.left: parent.left
500 anchors.right: parent.right
501 Component.onCompleted: text = QGroundControl.mapEngineManager.getUniqueName()
503 target: QGroundControl.mapEngineManager
504 onTileSetsChanged: setName.text = QGroundControl.mapEngineManager.getUniqueName()
510 spacing: ScreenTools.isTinyScreen ? 0 : ScreenTools.defaultFontPixelHeight * 0.25
511 anchors.left: parent.left
512 anchors.right: parent.right
514 text: qsTr("Map type:")
515 visible: !_saveRealEstate
519 anchors.left: parent.left
520 anchors.right: parent.right
521 model: QGroundControl.mapEngineManager.mapList
522 onActivated: (index) => {
523 mapType = textAt(index)
525 Component.onCompleted: {
526 var index = mapCombo.find(mapType)
528 console.warn("Active map name not in combo", mapType)
530 mapCombo.currentIndex = index
535 anchors.left: parent.left
536 anchors.right: parent.right
537 text: qsTr("Fetch elevation data")
538 checked: QGroundControl.mapEngineManager.fetchElevation
540 QGroundControl.mapEngineManager.fetchElevation = checked
547 anchors.left: parent.left
548 anchors.right: parent.right
549 height: zoomColumn.height + ScreenTools.defaultFontPixelHeight * 0.5
551 border.color: qgcPal.text
552 radius: ScreenTools.defaultFontPixelWidth * 0.5
556 spacing: ScreenTools.isTinyScreen ? 0 : ScreenTools.defaultFontPixelHeight * 0.5
557 anchors.margins: ScreenTools.defaultFontPixelHeight * 0.25
558 anchors.top: parent.top
559 anchors.left: parent.left
560 anchors.right: parent.right
563 text: qsTr("Min/Max Zoom Levels")
564 font.pointSize: _adjustableFontPointSize
565 anchors.horizontalCenter: parent.horizontalCenter
570 anchors.left: parent.left
571 anchors.right: parent.right
572 height: sliderTouchArea * 1.25
577 property bool _updateSetting: false
578 Component.onCompleted: {
579 sliderMinZoom.value = _settings.minZoomLevelDownload.rawValue
580 _updateSetting = true
583 if(sliderMinZoom.value > sliderMaxZoom.value) {
584 sliderMaxZoom.value = sliderMinZoom.value
586 if (_updateSetting) {
587 // Don't update setting until after Component.onCompleted since bad values come through before that
588 _settings.minZoomLevelDownload.rawValue = value
593 x: sliderMinZoom.leftPadding + sliderMinZoom.visualPosition * (sliderMinZoom.availableWidth - width)
594 y: sliderMinZoom.topPadding + sliderMinZoom.availableHeight * 0.5 - height * 0.5
595 implicitWidth: sliderTouchArea
596 implicitHeight: sliderTouchArea
597 radius: sliderTouchArea * 0.5
600 border.color: qgcPal.buttonText
602 text: sliderMinZoom.value
603 anchors.centerIn: parent
604 font.family: ScreenTools.normalFontFamily
605 font.pointSize: ScreenTools.smallFontPointSize
606 color: qgcPal.buttonText
609 } // Slider - min zoom
613 anchors.left: parent.left
614 anchors.right: parent.right
615 height: sliderTouchArea * 1.25
620 property bool _updateSetting: false
621 Component.onCompleted: {
622 sliderMaxZoom.value = _settings.maxZoomLevelDownload.rawValue
623 _updateSetting = true
626 if(sliderMaxZoom.value < sliderMinZoom.value) {
627 sliderMinZoom.value = sliderMaxZoom.value
629 if (_updateSetting) {
630 // Don't update setting until after Component.onCompleted since bad values come through before that
631 _settings.maxZoomLevelDownload.rawValue = value
636 x: sliderMaxZoom.leftPadding + sliderMaxZoom.visualPosition * (sliderMaxZoom.availableWidth - width)
637 y: sliderMaxZoom.topPadding + sliderMaxZoom.availableHeight * 0.5 - height * 0.5
638 implicitWidth: sliderTouchArea
639 implicitHeight: sliderTouchArea
640 radius: sliderTouchArea * 0.5
643 border.color: qgcPal.buttonText
645 text: sliderMaxZoom.value
646 anchors.centerIn: parent
647 font.family: ScreenTools.normalFontFamily
648 font.pointSize: ScreenTools.smallFontPointSize
649 color: qgcPal.buttonText
652 } // Slider - max zoom
656 rowSpacing: ScreenTools.isTinyScreen ? 0 : ScreenTools.defaultFontPixelHeight * 0.5
658 text: qsTr("Tile Count:")
659 font.pointSize: _adjustableFontPointSize
662 text: QGroundControl.mapEngineManager.tileCountStr
663 font.pointSize: _adjustableFontPointSize
667 text: qsTr("Est Size:")
668 font.pointSize: _adjustableFontPointSize
671 text: QGroundControl.mapEngineManager.tileSizeStr
672 font.pointSize: _adjustableFontPointSize
675 } // Column - Zoom info
676 } // Rectangle - Zoom info
679 text: qsTr("Too many tiles")
680 visible: _tooManyTiles
681 color: qgcPal.warningText
682 anchors.horizontalCenter: parent.horizontalCenter
687 spacing: ScreenTools.defaultFontPixelWidth
688 anchors.horizontalCenter: parent.horizontalCenter
690 text: qsTr("Download")
691 width: (addNewSetColumn.width * 0.5) - (addButtonRow.spacing * 0.5)
692 enabled: !_tooManyTiles && setName.text.length > 0
694 if (QGroundControl.mapEngineManager.findName(setName.text)) {
695 duplicateName.visible = true
697 QGroundControl.mapEngineManager.startDownload(setName.text, mapType);
704 width: (addNewSetColumn.width * 0.5) - (addButtonRow.spacing * 0.5)
705 onClicked: _map.destroy()
714 CenterMapDropButton {
717 anchors.margins: _margins
718 anchors.left: map.left
723 visible: _addNewSetViewObject
726 QGCPopupDialogFactory {
727 id: errorDialogFactory
729 dialogComponent: errorDialogComponent
733 id: errorDialogComponent
735 QGCSimpleMessageDialog {
736 title: qsTr("Error Message")
737 text: _mapEngineManager.errorMessage
738 buttons: Dialog.Close
742 QGCPopupDialogFactory {
743 id: deleteConfirmationDialogFactory
745 dialogComponent: deleteConfirmationDialogComponent
749 id: deleteConfirmationDialogComponent
751 QGCSimpleMessageDialog {
752 title: qsTr("Confirm Delete")
753 text: tileSet.defaultSet ?
754 qsTr("This will delete all tiles INCLUDING the tile sets you have created yourself.\n\nIs this really what you want?") :
755 qsTr("Delete %1 and all its tiles.\n\nIs this really what you want?").arg(tileSet.name)
756 buttons: Dialog.Yes | Dialog.No
759 QGroundControl.mapEngineManager.deleteTileSet(tileSet)