Fix groundTrackLine.getBounds error in satellite tab

Same fix as dashboard: LayerGroup doesn't have getBounds(), so collect
all coordinates and create bounds manually using L.latLngBounds().

🤖 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:31:41 +00:00
parent 13be9c189e
commit fc5a4b1b6b

View File

@@ -8384,6 +8384,7 @@
// Draw ground track segments
groundTrackLine = L.layerGroup();
const allCoords = [];
segments.forEach(seg => {
L.polyline(seg, {
color: pass.color || '#00ff00',
@@ -8391,6 +8392,7 @@
opacity: 0.8,
dashArray: '5, 5'
}).addTo(groundTrackLine);
allCoords.push(...seg);
});
groundTrackLine.addTo(groundTrackMap);
@@ -8414,8 +8416,8 @@
}
// Fit bounds to show track
if (segments.length > 0) {
groundTrackMap.fitBounds(groundTrackLine.getBounds(), { padding: [20, 20] });
if (allCoords.length > 0) {
groundTrackMap.fitBounds(L.latLngBounds(allCoords), { padding: [20, 20] });
}
}