From 7e7e1ced44979e90a61e9d5bec2339a872edfa05 Mon Sep 17 00:00:00 2001 From: Erik Bohnsack Date: Wed, 14 Jan 2026 14:31:30 +0100 Subject: [PATCH] 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. --- locale/en/messages.json | 18 ++ src/css/tabs/mission_planer.css | 24 ++- tabs/mission_control.html | 22 +++ tabs/mission_control.js | 327 ++++++++++++++++++++++++++++++++ 4 files changed, 389 insertions(+), 2 deletions(-) diff --git a/locale/en/messages.json b/locale/en/messages.json index 2ebe889e7..3841c8506 100644 --- a/locale/en/messages.json +++ b/locale/en/messages.json @@ -6195,6 +6195,24 @@ "gpsAssistnowLoadDataError": { "message": "Error loading AssistNow data." }, + "layerManagementTitle": { + "message": "Map Layer Management" + }, + "layerLoadGeoFile": { + "message": "Load GEO File" + }, + "layerDragDropHint": { + "message": "or drag & drop GEO files onto the map" + }, + "layerConfirmDelete": { + "message": "Are you sure you want to delete this layer?" + }, + "layerLoadError": { + "message": "Error loading GEO file. Please check the file format." + }, + "layerParseError": { + "message": "Error parsing GEO file. Unsupported format or corrupted data." + }, "adsbVehicleTotalMessages": { "message": "Vehicle msgs" }, diff --git a/src/css/tabs/mission_planer.css b/src/css/tabs/mission_planer.css index 28527c46b..ec6a19518 100644 --- a/src/css/tabs/mission_planer.css +++ b/src/css/tabs/mission_planer.css @@ -317,14 +317,22 @@ top: 140px; } -.geozone-settings { +.mission-control-layers { top: 165px; left: .5em; } -.ol-touch .geozone-settings { +.ol-touch .mission-control-layers { top: 165px; } +.geozone-settings { + top: 190px; + left: .5em; +} +.ol-touch .geozone-settings { + top: 190px; +} + .tab-mission-control .geozoneVerticesTable { width: 100%; text-align: center; @@ -592,4 +600,16 @@ width: 90%; height: 90%; padding-bottom: 5px; +} + +.tab-mission-control .layer-item { + transition: background-color 0.2s; +} + +.tab-mission-control .layer-item:hover { + background-color: rgba(255, 255, 255, 0.05); +} + +.tab-mission-control #geo_info { + transition: opacity 0.2s; } \ No newline at end of file diff --git a/tabs/mission_control.html b/tabs/mission_control.html index 1a389d1bf..62087556f 100644 --- a/tabs/mission_control.html +++ b/tabs/mission_control.html @@ -74,6 +74,27 @@ + +
+