Fix satellite marker disappearing when changing passes

When removing map layers, set references to null so new markers get
created properly on position updates. Also clear orbit track lines
when changing passes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
James Smith
2025-12-30 15:35:49 +00:00
parent fc5a4b1b6b
commit 43ff1a8b74
2 changed files with 29 additions and 6 deletions

View File

@@ -8363,8 +8363,22 @@
if (!pass || !pass.groundTrack) return;
// Remove old track and marker
if (groundTrackLine) groundTrackMap.removeLayer(groundTrackLine);
if (satMarker) groundTrackMap.removeLayer(satMarker);
if (groundTrackLine) {
groundTrackMap.removeLayer(groundTrackLine);
groundTrackLine = null;
}
if (satMarker) {
groundTrackMap.removeLayer(satMarker);
satMarker = null;
}
if (orbitTrackLine) {
groundTrackMap.removeLayer(orbitTrackLine);
orbitTrackLine = null;
}
if (pastOrbitLine) {
groundTrackMap.removeLayer(pastOrbitLine);
pastOrbitLine = null;
}
// Split ground track at antimeridian crossings
const segments = [];