OSINT Monitor Toggle entfernt — automatische Integration
Kein separater OSINT Monitor Layer mehr im Panel. Bei Lage-Auswahl im Header passiert automatisch: 1. Monitor-Standorte werden auf dem Globus angezeigt (rote Punkte) 2. Katastrophen-Klick zeigt passende Monitor-Artikel zum Ort 3. Keine Lage = keine Monitor-Daten Flow: Lage waehlen -> Monitor-Daten laden -> Katastrophen zeigen ortsspezifische Artikel beim Klick.
Dieser Commit ist enthalten in:
@@ -127,38 +127,29 @@ const Globe = {
|
||||
|
||||
_onLageChange(lageId) {
|
||||
this._currentLageId = lageId ? parseInt(lageId) : null;
|
||||
if (typeof MonitorLayer === 'undefined') return;
|
||||
|
||||
if (lageId) {
|
||||
// Monitor-Layer automatisch starten wenn nicht aktiv
|
||||
if (!MonitorLayer._points) {
|
||||
MonitorLayer.start(this.viewer);
|
||||
var cb = document.getElementById('layer-monitor');
|
||||
if (cb) cb.checked = true;
|
||||
if (typeof MonitorLayer !== 'undefined') {
|
||||
if (lageId) {
|
||||
if (!MonitorLayer._points) MonitorLayer.start(this.viewer);
|
||||
MonitorLayer._data = [];
|
||||
MonitorLayer._incidents = [];
|
||||
MonitorLayer._render();
|
||||
MonitorLayer._fetchForLage(lageId);
|
||||
} else {
|
||||
MonitorLayer.stop();
|
||||
}
|
||||
MonitorLayer._data = [];
|
||||
MonitorLayer._incidents = [];
|
||||
MonitorLayer._render();
|
||||
MonitorLayer._fetchForLage(lageId);
|
||||
} else {
|
||||
// Keine Lage: Monitor-Layer stoppen
|
||||
MonitorLayer.stop();
|
||||
var cb = document.getElementById('layer-monitor');
|
||||
if (cb) cb.checked = false;
|
||||
}
|
||||
|
||||
// Katastrophen-Layer Monitor-Kontext aktualisieren
|
||||
// Katastrophen-Layer: Monitor-Daten aktualisieren
|
||||
if (typeof DisastersLayer !== 'undefined' && DisastersLayer._dataSource) {
|
||||
DisastersLayer._fetchMonitorContext();
|
||||
}
|
||||
|
||||
// Sidebar aktualisieren
|
||||
if (typeof Sidebar !== 'undefined') Sidebar.update();
|
||||
},
|
||||
|
||||
_setupLayerToggles() {
|
||||
var toggles = {
|
||||
'layer-monitor': function(on) { on ? MonitorLayer.start(Globe.viewer) : MonitorLayer.stop(); },
|
||||
'layer-flights': function(on) { on ? FlightsLayer.start(Globe.viewer) : FlightsLayer.stop(); },
|
||||
'layer-ships': function(on) { on ? ShipsLayer.start(Globe.viewer) : ShipsLayer.stop(); },
|
||||
'layer-gdelt': function(on) { on ? GdeltLayer.start(Globe.viewer) : GdeltLayer.stop(); },
|
||||
@@ -186,9 +177,6 @@ const Globe = {
|
||||
if (typeof QuakesLayer !== 'undefined' && QuakesLayer._count > 0) {
|
||||
document.getElementById('count-quakes').textContent = QuakesLayer._count.toLocaleString('de-DE');
|
||||
}
|
||||
if (typeof MonitorLayer !== 'undefined' && MonitorLayer._count > 0) {
|
||||
document.getElementById('count-monitor').textContent = MonitorLayer._count.toLocaleString('de-DE');
|
||||
}
|
||||
if (typeof SatellitesLayer !== 'undefined' && SatellitesLayer._count > 0) {
|
||||
document.getElementById('count-satellites').textContent = SatellitesLayer._count.toLocaleString('de-DE');
|
||||
}
|
||||
|
||||
@@ -28,10 +28,15 @@ const DisastersLayer = {
|
||||
|
||||
_fetchMonitorContext() {
|
||||
var self = this;
|
||||
var lageId = (typeof Globe !== 'undefined' && Globe._currentLageId) ? Globe._currentLageId : '';
|
||||
fetch('/api/monitor-feed' + (lageId ? '?incident_id=' + lageId : ''))
|
||||
var lageId = (typeof Globe !== 'undefined') ? Globe._currentLageId : null;
|
||||
if (!lageId) { self._monitorData = null; return; }
|
||||
fetch('/api/monitor-feed?incident_id=' + lageId)
|
||||
.then(function(r) { return r.json(); })
|
||||
.then(function(data) { self._monitorData = data; })
|
||||
.then(function(data) {
|
||||
self._monitorData = data;
|
||||
// Katastrophen neu rendern mit Monitor-Kontext
|
||||
if (self._dataSource) self._fetch();
|
||||
})
|
||||
.catch(function() {});
|
||||
},
|
||||
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren