-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Problem
When hovering over the ocean with the SST layer active, no tooltip appears showing the sea surface temperature. All other weather layers (wind, waves, swell, currents, visibility) display hover tooltips correctly.
Investigation done
- SST API data is valid:
GET /api/weather/sstreturns 120x221 grid with correct lat/lon, valid temperatures at known ocean points (e.g. Brest 11.28°C, North Sea 5.04°C) - Forecast frames endpoint also returns valid data (220x461 grid, 41 frames)
GridFieldDatatype matches the response shape (data: number[][],lats,lons)getGridIndicesandbilinearInterpolatework correctly with SST lat/lon ranges (ascending, 30-60°N, -15 to 40°E)- Ocean mask has some gaps (Tyrrhenian Sea returns False despite being ocean) but most ocean points pass the mask check
extendedWeatherDatais set correctly in page.tsx for both single-frame and forecast paths- WaveInfoPopup receives
sstDataprop whenweatherLayer === 'sst' - Code is structurally identical to the working visibility handler
- No TypeScript compilation errors
- No visible errors in frontend container logs
- Added try-catch: no error thrown
Attempted fix (reverted)
Commit b7728a7 (reverted in b544014) added:
ssttoActiveLayertype union in WaveInfoPopupsstData: GridFieldData | nullprop + ref- SST handler with bilinear interpolation, °C/°F display, color coding
- MapComponent wiring:
sstData={weatherLayer === 'sst' ? extendedWeatherData as any : null}
Despite the code being correct on paper, the tooltip never appeared. Needs browser-side debugging (console, breakpoints) to identify root cause.
Possible causes to investigate
- HMR/cache issue: browser serving stale bundle without SST handler
- Silent JS error in mousemove handler (no try-catch in production path)
- Data ref timing:
sstRef.currentmay be null when handler fires - Leaflet event propagation issue specific to SST tile layer
Labels
Enhancement — SST layer UX
Reactions are currently unavailable