Fix APRS observer location not updating after settings change

Dispatch observer-location-changed event from settings manager and
listen for it in APRS mode so manual location saves propagate to
the map and distance calculations. Also refresh ObserverLocation in
initAprsMap() to catch changes between page load and first map use.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-03-16 15:00:35 +00:00
parent 8d537a61ed
commit e9fdadbbd8
2 changed files with 28 additions and 0 deletions

View File

@@ -1090,6 +1090,14 @@ async function saveObserverLocation() {
SSTV.loadIssSchedule();
}
// Update APRS user location if function is available
if (typeof updateAprsUserLocation === 'function') {
updateAprsUserLocation({ latitude: lat, longitude: lon });
}
// Notify all listeners (any mode can subscribe)
window.dispatchEvent(new CustomEvent('observer-location-changed', { detail: { lat, lon } }));
if (typeof showNotification === 'function') {
showNotification('Location', notificationMessage);
}