From 07574d3c8f1911f4e82fd741f7a46681bab5b98c Mon Sep 17 00:00:00 2001 From: Claude Dev Date: Tue, 24 Mar 2026 12:57:08 +0100 Subject: [PATCH] Fix: Kamera-Zoom bei Klick nicht mehr zu nah Cluster-Klick Distanzen erhoeht: far 2.000->4.000km, medium 500->1.500km. trackedEntity auf undefined gesetzt vor selectedEntity (verhindert Auto-Tracking). --- static/js/layers/flights.js | 3 ++- static/js/layers/ships.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/static/js/layers/flights.js b/static/js/layers/flights.js index a13a46e..641a704 100644 --- a/static/js/layers/flights.js +++ b/static/js/layers/flights.js @@ -165,6 +165,7 @@ const FlightsLayer = { } if (best && bestDist < 1) { var cs = (best.flight || best.hex || '?').trim(); + this._viewer.trackedEntity = undefined; this._viewer.selectedEntity = new Cesium.Entity({ name: cs, description: '
' + @@ -178,7 +179,7 @@ const FlightsLayer = { } else { // Cluster: Reinzoomen auf Klickposition this._viewer.camera.flyTo({ - destination: Cesium.Cartesian3.fromDegrees(clickLon, clickLat, level === 'far' ? 2000000 : 500000), + destination: Cesium.Cartesian3.fromDegrees(clickLon, clickLat, level === "far" ? 4000000 : 1500000), duration: 1.0, }); } diff --git a/static/js/layers/ships.js b/static/js/layers/ships.js index 6c33d8a..ddce76a 100644 --- a/static/js/layers/ships.js +++ b/static/js/layers/ships.js @@ -128,6 +128,7 @@ const ShipsLayer = { } if (best && bestDist < 0.5) { var name = best.name || ('MMSI ' + (best.mmsi || '?')); + this._viewer.trackedEntity = undefined; this._viewer.selectedEntity = new Cesium.Entity({ name: name, description: '
' + @@ -136,7 +137,7 @@ const ShipsLayer = { }); } } else { - this._viewer.camera.flyTo({ destination: Cesium.Cartesian3.fromDegrees(clickLon, clickLat, level === 'far' ? 2000000 : 500000), duration: 1.0 }); + this._viewer.camera.flyTo({ destination: Cesium.Cartesian3.fromDegrees(clickLon, clickLat, level === "far" ? 4000000 : 1500000), duration: 1.0 }); } },