From 0375448019a97c005f79fc920b9eb12baff27528 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sat, 2 Aug 2025 09:41:43 -0500 Subject: [PATCH] fix: Send bounds to server after map initialization to trigger historical loading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added sendBoundsToServer() call after map_ready event - Previously only saveMapState was called which doesn't send bounds - This ensures historical packets are loaded on initial page load - Also added to retry logic for reliability The issue was that bounds_changed event was never triggered on initial load, preventing historical packets from being fetched. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- assets/js/map.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/js/map.ts b/assets/js/map.ts index 4494102..e4953ca 100644 --- a/assets/js/map.ts +++ b/assets/js/map.ts @@ -418,6 +418,8 @@ let MapAPRSMap = { // Send initial bounds to trigger historical loading if (self.map && self.pushEvent && typeof self.pushEvent === "function") { saveMapState(self.map, self.pushEvent.bind(self)); + // Also send bounds to server to trigger historical loading + self.sendBoundsToServer(); } // Also send update_map_state to ensure URL updates and bounds processing @@ -435,6 +437,8 @@ let MapAPRSMap = { self.pushEvent("map_ready", {}); if (self.map) { saveMapState(self.map, self.pushEvent.bind(self)); + // Also send bounds to server to trigger historical loading + self.sendBoundsToServer(); } // Also trigger map state update after a delay setTimeout(() => {