feat(global-view): live webcam filter results should be clickable and open in new tab
Problem
On the global map, the live webcam filter draws camera markers that cannot be clicked. User has to search the camera by name to watch it.
What already exists
- Layer:
src/components/DeckGLMap.tsid: 'webcam-layer'(ScatterplotLayer<WebcamEntry | WebcamCluster>) - Map click bus: same file, Deck
onClick→handleClick(info) - Filter is a
MapLayers.webcamsflag (src/types/index.ts) - Open PR #4230 (
fix: wire onClick handler to webcam markers on filtered map layer) — finish or rebase this, do not rewrite from scratch
Scope
Clicking a single webcam marker opens its stream URL in a new tab.
In scope
handleClickonwebcam-layerobjects that have a stream URLwindow.open(url, '_blank', 'noopener,noreferrer')(or equivalent)- No-op when URL is missing
- Clusters: do not open N tabs; zoom/expand or show a picker (pick one and document it)
Out of scope
- In-map video player / iframe embed (ToS and CSP)
- Changing how webcams are ingested
- Making every map layer open a tab
Acceptance
- [ ] Filter on → click a single camera marker → stream URL opens in a new tab
- [ ]
rel/noopenerso the opener is not leaked - [ ] Missing URL does nothing (no throw)
- [ ] Cluster click does not spawn a tab storm
- [ ] Existing search-to-watch path still works
- [ ] PR #4230 is the vehicle, or is closed with a pointer to the replacement PR
Device: web global map. Effort: S (~0.5d).
Additional suggestion
It would also be useful to allow users to add live webcams to their dashboard camera panel directly from the global map view.
When browsing filtered webcam markers on the map, there should be an option (e.g. a "+" or "Add to Dashboard" button on the marker popup or stream preview) to pin that camera to the user's camera panel for quick access later.
Expected flow: filter on global map → click camera → preview/open stream → option to save/add to dashboard camera panel → camera appears in panel on next visit
This turns the global webcam filter from a one-time browse into a way to build a personal live camera collection inside the dashboard.
Working a follow-up to closed #4230 rather than reviving that patch.
#4230 wired webcam-layer onClick to showWebcamClickPopup, but:
- the first revision missed the cluster guard and
return true, so cluster clicks were unsafely cast asWebcamEntryand leaf clicks double-fired through the global Deck handler - even after those fixes, current
mainalready shows the pin popup viahandleClick, and that popup still does not open the stream (it also waited onfetchWebcamImagebefore mounting, so a slow image fetch made clicks look dead)
The replacement:
- distinguish
WebcamEntryvsWebcamClustervia the_kindtag stamped atsetWebcams(with acount/webcamIdfallback) — no cluster→leaf cast - layer
onClickreturnstrueso the global handler does not double-fire - leaf click opens the public Windy URL with
window.open(..., '_blank', 'noopener,noreferrer')and still uses the existing pin popup - cluster click zooms in instead of opening N tabs
- missing URL is a no-op (no throw)
PR incoming.