map: cluster camera markers so cameras stay visible when zoomed in
All checks were successful
build-and-deploy / build (push) Successful in 4m33s

Zooming in replaced the marker group with a bbox subset, so dense world
views (5k dots) thinned to a handful of pins — or zero on a wrapped world
copy, where currentBBox collapsed to a sliver and the API returned ~nothing.
Cameras only seemed to exist when zoomed out.

- vendor leaflet.markercluster 1.5.3; camera markers now render as numbered
  neon-green clusters at low zoom and split into individual dots as you zoom,
  so camera coverage is visible at every zoom level (spiderfy at max zoom)
- guard against null lat/lon rows (no phantom markers at 0,0)
- stale-response guard for loadCams/loadFires: rapid wheel zoom can resolve
  fetches out of order and a stale bbox response blanked the map
- serve index.html with Cache-Control: no-cache so the browser never keeps
  serving a pre-deploy copy after fixes land
This commit is contained in:
Sirius DevOps 2026-08-27 17:00:09 -04:00
commit 5cea0a5940
5 changed files with 121 additions and 5 deletions

View file

@ -966,7 +966,12 @@ async def list_news_summaries(
@app.get("/", response_class=HTMLResponse)
async def index():
return FileResponse(str(STATIC_DIR / "index.html"))
# Never let browsers serve a stale copy of the app shell: no Cache-Control
# means heuristic caching, and a stale index.html froze older bugs in users'
# tabs after deploys. Revalidate every load (ETag still returns 304).
resp = FileResponse(str(STATIC_DIR / "index.html"))
resp.headers["Cache-Control"] = "no-cache"
return resp
# ── NASA GIBS basemap map tab ─────────────────────────────────────────────