mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
Fix satellite dashboard map - remove old track lines properly
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user