5 neue Layer: Militaerflug, Seekabel, Infrastruktur, ISS Tracker

MILITAERFLUGVERKEHR (adsb.lol /v2/mil):
- ~254 Militaerflugzeuge weltweit in Echtzeit (rot)
- Callsign-Labels bei Zoom (RCH=USAF, GAF=Luftwaffe etc.)
- Klick zeigt: Callsign, Registration, Typ, Hoehe, Squawk
- 20s Refresh

SEEKABEL (TeleGeography):
- Untersee-Glasfaserkabel als cyan-Linien auf dem Globus
- ~500+ internationale Kabelverbindungen
- Geopolitisch relevant (Sabotage, Abhoerung)

INFRASTRUKTUR (OpenStreetMap Overpass):
- 348 Kernkraftwerke weltweit (gelb mit Orange-Rand)
- Militaerflughaefen (rot)
- Labels bei Zoom (<500km)
- 24h Cache (statische Daten)

ISS TRACKER (Open-Notify API):
- Echtzeit-Position der ISS (roter Punkt, 420km Hoehe)
- 5s Refresh, prominentes Label
- Klick zeigt Details

Backend: data_military.py, data_infra.py (2 neue Dateien)
Frontend: military.js, cables.js, infra.js, iss.js (4 neue Dateien)
Dieser Commit ist enthalten in:
Claude Dev
2026-03-24 23:05:43 +01:00
Ursprung 4539bd19b3
Commit fd9e6558db
10 geänderte Dateien mit 376 neuen und 0 gelöschten Zeilen

63
static/js/layers/infra.js Normale Datei
Datei anzeigen

@@ -0,0 +1,63 @@
const InfraLayer = {
_viewer: null, _points: null, _labels: null, _count: 0,
start(viewer) {
if (this._points) return;
this._viewer = viewer;
this._points = viewer.scene.primitives.add(new Cesium.PointPrimitiveCollection());
this._labels = viewer.scene.primitives.add(new Cesium.LabelCollection());
this._fetchNuclear();
this._fetchBases();
},
stop() {
if (this._points && this._viewer) { this._viewer.scene.primitives.remove(this._points); this._points = null; }
if (this._labels && this._viewer) { this._viewer.scene.primitives.remove(this._labels); this._labels = null; }
this._count = 0;
},
_fetchNuclear() {
var self = this;
fetch('/api/nuclear-plants')
.then(function(r) { return r.json(); })
.then(function(data) {
var yellow = Cesium.Color.fromCssColorString('#ffdd00');
(data.plants || []).forEach(function(p) {
self._points.add({ position: Cesium.Cartesian3.fromDegrees(p.lon, p.lat, 0), pixelSize: 5, color: yellow,
outlineColor: Cesium.Color.fromCssColorString('#ff8800'), outlineWidth: 2 });
self._labels.add({
position: Cesium.Cartesian3.fromDegrees(p.lon, p.lat, 0), text: p.name,
font: '9px sans-serif', fillColor: yellow, outlineColor: Cesium.Color.BLACK, outlineWidth: 2,
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
pixelOffset: new Cesium.Cartesian2(0, -10), scale: 0.6,
distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0, 500000),
});
});
self._count += (data.plants || []).length;
var s = document.getElementById('status-infra');
if (s) { s.textContent = self._count + ' Standorte'; s.classList.add('active');
setTimeout(function() { s.classList.remove('active'); }, 5000); }
}).catch(function() {});
},
_fetchBases() {
var self = this;
fetch('/api/military-bases')
.then(function(r) { return r.json(); })
.then(function(data) {
var red = Cesium.Color.fromCssColorString('#ff4444');
(data.bases || []).forEach(function(b) {
self._points.add({ position: Cesium.Cartesian3.fromDegrees(b.lon, b.lat, 0), pixelSize: 4, color: red,
outlineColor: Cesium.Color.fromCssColorString('#aa0000'), outlineWidth: 1 });
self._labels.add({
position: Cesium.Cartesian3.fromDegrees(b.lon, b.lat, 0), text: b.name,
font: '9px sans-serif', fillColor: red, outlineColor: Cesium.Color.BLACK, outlineWidth: 2,
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
pixelOffset: new Cesium.Cartesian2(0, -10), scale: 0.6,
distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0, 500000),
});
});
self._count += (data.bases || []).length;
}).catch(function() {});
},
};