mirror of
https://github.com/smittix/intercept.git
synced 2026-04-26 23:59:59 -07:00
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:
@@ -1161,10 +1161,19 @@
|
||||
function updateGroundTrack(pass) {
|
||||
if (!groundMap) return;
|
||||
|
||||
// Clear all existing map layers
|
||||
if (trackLine) groundMap.removeLayer(trackLine);
|
||||
if (satMarker) groundMap.removeLayer(satMarker);
|
||||
if (orbitTrack) groundMap.removeLayer(orbitTrack);
|
||||
// Clear all existing map layers and reset references
|
||||
if (trackLine) {
|
||||
groundMap.removeLayer(trackLine);
|
||||
trackLine = null;
|
||||
}
|
||||
if (satMarker) {
|
||||
groundMap.removeLayer(satMarker);
|
||||
satMarker = null;
|
||||
}
|
||||
if (orbitTrack) {
|
||||
groundMap.removeLayer(orbitTrack);
|
||||
orbitTrack = null;
|
||||
}
|
||||
|
||||
if (pass && pass.groundTrack) {
|
||||
// Split track at antimeridian crossings to avoid lines across map
|
||||
|
||||
Reference in New Issue
Block a user