fix: Send bounds to server after map initialization to trigger historical loading
- 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 <noreply@anthropic.com>
This commit is contained in:
parent
1e7817646b
commit
0375448019
1 changed files with 4 additions and 0 deletions
|
|
@ -418,6 +418,8 @@ let MapAPRSMap = {
|
||||||
// Send initial bounds to trigger historical loading
|
// Send initial bounds to trigger historical loading
|
||||||
if (self.map && self.pushEvent && typeof self.pushEvent === "function") {
|
if (self.map && self.pushEvent && typeof self.pushEvent === "function") {
|
||||||
saveMapState(self.map, self.pushEvent.bind(self));
|
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
|
// Also send update_map_state to ensure URL updates and bounds processing
|
||||||
|
|
@ -435,6 +437,8 @@ let MapAPRSMap = {
|
||||||
self.pushEvent("map_ready", {});
|
self.pushEvent("map_ready", {});
|
||||||
if (self.map) {
|
if (self.map) {
|
||||||
saveMapState(self.map, self.pushEvent.bind(self));
|
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
|
// Also trigger map state update after a delay
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue