From 959a1d9f6e753526426c583a857dbcf90bd827e3 Mon Sep 17 00:00:00 2001 From: James Smith Date: Mon, 22 Dec 2025 17:26:44 +0000 Subject: [PATCH] Fix satellite dashboard map - remove old track lines properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Clear trackLine, satMarker, and orbitTrack before adding new ones - Remove duplicate cleanup code - Clear pass track when showing live orbit to avoid confusion 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- intercept.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/intercept.py b/intercept.py index a0a4b32..ab51dd4 100755 --- a/intercept.py +++ b/intercept.py @@ -13495,9 +13495,10 @@ def satellite_dashboard(): function updateGroundTrack(pass) { if (!groundMap) return; - // Clear existing + // Clear all existing map layers if (trackLine) groundMap.removeLayer(trackLine); if (satMarker) groundMap.removeLayer(satMarker); + if (orbitTrack) groundMap.removeLayer(orbitTrack); if (pass && pass.groundTrack) { const coords = pass.groundTrack.map(pt => [pt.lat, pt.lon]); @@ -13695,9 +13696,12 @@ def satellite_dashboard(): satMarker = L.marker([pos.lat, pos.lon], { icon: satIcon }).addTo(groundMap); } - // Update orbit track + // Update orbit track (clear old track first) if (pos.track && groundMap) { if (orbitTrack) groundMap.removeLayer(orbitTrack); + if (trackLine) groundMap.removeLayer(trackLine); + trackLine = null; // Clear pass track when showing live orbit + orbitTrack = L.polyline(pos.track.map(p => [p.lat, p.lon]), { color: satColor, weight: 2,