prop/assets
Graham McIntire f4a177c9d0
perf(weather): single-fetch viewport cells, client-side recolor on layer switch
Previously every layer toggle triggered 21 fresh tile requests with the
new layer in the URL — ~21 server-side SVG renders, plus the round-trip
overhead. Even with the GridCache fix the server still spent real CPU
generating thousands of <rect>s per tile, and the user felt it.

Add /weather/cells: a single JSON endpoint returning every layer field
for every cell in the requested viewport. The hook fetches once on
mount, time change, or pan/zoom, caches the cells in memory, and paints
them via L.svgOverlay. Layer switches now re-color the same cached
cells locally — zero network, zero server CPU.

The single SVG uses lat/lon coords with preserveAspectRatio="none";
Leaflet stretches it linearly to the bbox. There is mild equirect→
mercator distortion at low zoom over CONUS but it's imperceptible at
typical use (z6+) and the layer-toggle UX win is large.

Tile endpoint kept for back-compat. svgOverlay opacity matches the
prior tile renderer's 0.55 fill-opacity.
2026-04-29 13:31:17 -05:00
..
css feat(rover): home accepts grid/callsign/address; station markers labeled; imperial scale 2026-04-25 16:40:03 -05:00
js perf(weather): single-fetch viewport cells, client-side recolor on layer switch 2026-04-29 13:31:17 -05:00
vendor feat(rover): score per-station terrain clearance from SRTM path samples 2026-04-25 17:29:29 -05:00
tsconfig.json Convert all JavaScript to TypeScript with type annotations 2026-04-11 16:59:28 -05:00