Skip to content

Commit 5b18a80

Browse files
committed
feat(mission-control): add local geo layers to map
Add functionality to mission-control tab so that users can either load or drag&drop Geo files (KML, GeoJSON, GPX) to the visualization of the map. Use open layers native layers functionality for the visualization.
1 parent a869ede commit 5b18a80

File tree

4 files changed

+376
-2
lines changed

4 files changed

+376
-2
lines changed

locale/en/messages.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6195,6 +6195,24 @@
61956195
"gpsAssistnowLoadDataError": {
61966196
"message": "Error loading AssistNow data."
61976197
},
6198+
"layerManagementTitle": {
6199+
"message": "Map Layer Management"
6200+
},
6201+
"layerLoadGeoFile": {
6202+
"message": "Load GEO File"
6203+
},
6204+
"layerDragDropHint": {
6205+
"message": "or drag & drop GEO files onto the map"
6206+
},
6207+
"layerConfirmDelete": {
6208+
"message": "Are you sure you want to delete this layer?"
6209+
},
6210+
"layerLoadError": {
6211+
"message": "Error loading GEO file. Please check the file format."
6212+
},
6213+
"layerParseError": {
6214+
"message": "Error parsing GEO file. Unsupported format or corrupted data."
6215+
},
61986216
"adsbVehicleTotalMessages": {
61996217
"message": "Vehicle msgs"
62006218
},

src/css/tabs/mission_planer.css

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,14 +317,22 @@
317317
top: 140px;
318318
}
319319

320-
.geozone-settings {
320+
.mission-control-layers {
321321
top: 165px;
322322
left: .5em;
323323
}
324-
.ol-touch .geozone-settings {
324+
.ol-touch .mission-control-layers {
325325
top: 165px;
326326
}
327327

328+
.geozone-settings {
329+
top: 190px;
330+
left: .5em;
331+
}
332+
.ol-touch .geozone-settings {
333+
top: 190px;
334+
}
335+
328336
.tab-mission-control .geozoneVerticesTable {
329337
width: 100%;
330338
text-align: center;
@@ -592,4 +600,16 @@
592600
width: 90%;
593601
height: 90%;
594602
padding-bottom: 5px;
603+
}
604+
605+
.tab-mission-control .layer-item {
606+
transition: background-color 0.2s;
607+
}
608+
609+
.tab-mission-control .layer-item:hover {
610+
background-color: rgba(255, 255, 255, 0.05);
611+
}
612+
613+
.tab-mission-control #geo_info {
614+
transition: opacity 0.2s;
595615
}

tabs/mission_control.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,27 @@
7474
</div>
7575
</div>
7676

77+
<div id="missionPlannerLayers" class="gui_box grey" style="display: none">
78+
<div class="gui_box_titlebar">
79+
<div class="spacer_box_title" data-i18n="layerManagementTitle"></div>
80+
<div class="btnMenu btnMenuIcon save_btn">
81+
<a id="cancelLayers" class="ic_cancel" href="#" i18n_title="missionTitleCancel"></a>
82+
</div>
83+
</div>
84+
<div class="spacer" id="layerContent">
85+
<div class="btn save_btn" style="margin-bottom: 10px;">
86+
<a id="loadGeoFileButton" class="btnicon ic_loadFromFile" href="#"
87+
title="Load GEO File (KML, GeoJSON, GPX)"></a>
88+
</div>
89+
<hr>
90+
<div id="layerListContainer" style="padding: 0 5px;"></div>
91+
<hr>
92+
<div style="text-align: center; color: #888; font-size: 0.9em; margin-top: 10px;">
93+
<span data-i18n="layerDragDropHint"></span>
94+
</div>
95+
</div>
96+
</div>
97+
7798
<div id="missionPlannerSettings" class="gui_box grey" style="display: none">
7899
<div class="gui_box_titlebar">
79100
<div class="spacer_box_title" data-i18n="missionDefaultSettingsHead"></div>
@@ -570,6 +591,7 @@
570591
</div>
571592
</div>
572593
<div class="cf_column threefourth_left" style="height: 100%;">
594+
<div id="geo_info" style="display: block; position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.7); color: white; padding: 5px 10px; border-radius: 4px; font-size: 0.9em; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; max-width: 80%; pointer-events: none; z-index: 1000;">&nbsp;</div>
573595
<div id="missionMap"></div>
574596
<div id="missionPlannerElevation" class="gui_box grey" style="display: none">
575597
<div class="gui_box_titlebar">

0 commit comments

Comments
 (0)