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. |
||
|---|---|---|
| .. | ||
| agent_skills_controller_test.exs | ||
| api_catalog_controller_test.exs | ||
| beacon_monitor_controller_test.exs | ||
| contact_map_controller_test.exs | ||
| error_html_test.exs | ||
| error_json_test.exs | ||
| health_controller_test.exs | ||
| page_controller_test.exs | ||
| user_registration_controller_test.exs | ||
| user_reset_password_controller_test.exs | ||
| user_session_controller_test.exs | ||
| user_settings_controller_test.exs | ||
| weather_tile_controller_test.exs | ||