Weather (NWS API)
Client-side reqwest calls to api.weather.gov — starting with wet bulb globe temperature (WBGT).
Weather demo uses the shared location store. Coordinates come from whichever provider is active (see Manage location).
No active location yet — open Manage location and refresh a provider.
SSG & hydration
Build / SSG: This page renders static placeholders only. NWS and geolocation requests run after you click — never in the component body or on mount.
Browser: reqwest talks to api.weather.gov directly (CORS is open). Set a descriptive User-Agent header — this demo uses hayley-ssg-template (Hayley SSG Demo, ssgdemo@vortex.cx).
Location
Use either the combined latitude, longitude field or the separate boxes — not all three at once. Fields sync after a short debounce. Fetch forecast below uses whatever coordinates are valid here.
To refresh providers or change which one is active, use Manage location (or the Geolocation / GeoJS demos).
or
Enter coordinates above or use Get my location — Fetch forecast stays disabled until latitude and longitude are valid.
Forecast
Two NWS requests: /points/{lat},{lon} then grid forecastGridData (currently wetBulbGlobeTemperature). Runs only when you click — not on mount.
Set valid coordinates in the location section above to enable this button.
No forecast yet. Set a location, then click Fetch forecast.
Tips
- Flow:
/points/{lat},{lon}→ readforecastGridData→wetBulbGlobeTemperature.values. Fill from active locationcopies the shared active coordinates into the fields;Fetch forecastis a separate step. Refresh providers on Manage location.- Coordinate fields use
use_debouncefromdioxus-sdk-timeso typing in one format does not fight the others mid-keystroke. - WBGT intervals use
validTimelike2026-06-01T18:00:00+00:00/PT3H— expand to one value per UTC hour before building the table. - Grid
updateTimeis when NWS last refreshed the grid; individual hours may still start earlier. Refresh is available but the grid may not change every minute. - County name lookup is deferred;
relativeLocationfrom/pointsis shown instead. - Do not provide multiple
use_context_provider(|| Signal<String>)values — context is keyed by type; use a struct (seeWeatherCoordinatesin this file).