From fc5a4b1b6bc9b419af9680355d32f2711921b81c Mon Sep 17 00:00:00 2001 From: James Smith Date: Tue, 30 Dec 2025 15:31:41 +0000 Subject: [PATCH] Fix groundTrackLine.getBounds error in satellite tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- templates/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/index.html b/templates/index.html index 0efc508..b5a32a8 100644 --- a/templates/index.html +++ b/templates/index.html @@ -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] }); } }