v2.26.12: fix AIS/ADS-B dashboards ignoring configured observer position

Pass DEFAULT_LATITUDE/DEFAULT_LONGITUDE from config to both standalone
dashboard templates so observer-location.js uses .env values instead of
falling back to hardcoded London coordinates on first visit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-03-14 21:11:46 +00:00
parent 7ed039564b
commit 6b9c4ebebd
5 changed files with 29 additions and 8 deletions

View File

@@ -15,7 +15,7 @@ import time
from flask import Blueprint, Response, jsonify, render_template, request
import app as app_module
from config import SHARED_OBSERVER_LOCATION_ENABLED
from config import DEFAULT_LATITUDE, DEFAULT_LONGITUDE, SHARED_OBSERVER_LOCATION_ENABLED
from utils.constants import (
AIS_RECONNECT_DELAY,
AIS_SOCKET_TIMEOUT,
@@ -542,5 +542,7 @@ def ais_dashboard():
return render_template(
'ais_dashboard.html',
shared_observer_location=SHARED_OBSERVER_LOCATION_ENABLED,
default_latitude=DEFAULT_LATITUDE,
default_longitude=DEFAULT_LONGITUDE,
embedded=embedded,
)