A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.
JavaScript 3d-globecesiumflight-trackinggeospatialgeospatial-intelligencegisosintphotogrammetrysatellite-trackingspatial-intelligencewebglworldview
Merge remote-tracking branch 'origin/main' into feat/king-county-camera-pack
bassem chagra054f1cc1986d
diff --cc .env.exampleindex 4bfabcb62,2b7ff95ab..6bdec8f8b--- a/.env.example+++ b/.env.example@@@ -180,8 -205,10 +205,12 @@@ AISSTREAM_API_KEY# CCTV_CALGARY_ENABLED=1 # set 0 to disable the Open Calgary (Alberta) cameras# CCTV_CALGARY_MAX_SOURCES=220 # cap cameras loaded from the Open Calgary catalog# CCTV_CALGARY_ROWS_URL= # override the Open Calgary catalog URL+# CCTV_KINGCOUNTY_ENABLED=1 # set 0 to disable the King County (Washington) road cameras+# CCTV_KINGCOUNTY_MAX_SOURCES=125 # cap cameras loaded from the King County catalog+ # CCTV_VEGVESEN_ENABLED=1 # set 0 to disable the Statens vegvesen (Norway) road cameras+ # CCTV_VEGVESEN_MAX_SOURCES=900 # cap cameras loaded from Statens vegvesen (default loads all ~850 live; max 1000)+ # CCTV_VEGVESEN_VIDEO=1 # set 0 to show stills instead of live HLS for Statens vegvesen video cameras+ # CCTV_VEGVESEN_URL= # override the Statens vegvesen catalog URL# CCTV_MAX_SOURCES=4000 # catalog-wide ceiling, shared round-robin across packs# CCTV_PREFER_AUSTIN=1 # prioritize Austin cameras in the registry# CCTV_FORCE_AUSTIN= # force live default sources when a source-pack JSON is configureddiff --cc CHANGELOG.mdindex c72cac950,747c6227d..de040eab6--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -1,15 -1,203 +1,214 @@@# Changelog+- Add King County road cameras (Washington State) as a keyless CCTV source+ pack: one public King County DOT ArcGIS layer, fetched with an explicit field+ list so its staff-name columns are never requested, and frames pinned to the+ county's own image host and upgraded to HTTPS. WSDOT-owned rows are skipped,+ and city-owned cameras the county hosts credit their owner. The layer+ publishes no facing, so headings use the shared id-hash fallback at low+ confidence. It does publish each camera's hardware, which is served on+ `/api/cctv/sources` as `model` and `manufacturer`. `CCTV_KINGCOUNTY_MAX_SOURCES`+ sets the cap and `CCTV_KINGCOUNTY_ENABLED=0` turns the pack off+ (bassem chagra, #645).+++ - MCP setup examples use the app's default port, `4173`. Thanks to+ [Huanyi Xie](https://github.com/xiehuanyi) (#934) and+ [shirunjies8-png](https://github.com/shirunjies8-png) (#959) for the same fix.++ - Voice revisits numbered analyst records through current layer snapshots and+ preserves resolved pin coordinates. Requested analyst lists and rankings can+ speak returned items alongside the exact count and coverage caveats. Failed+ actions settle the voice card without reviving cancelled turns. Coverage+ benchmarks reject invalid calls before accepting semantic matches.++ - Street Level is included in the voice layer manifest for visibility toggles;+ imagery is not exposed as countable analyst records.++ - Voice debug logs omit complete tool-result bodies and serialized function+ outputs by default, including location queries and generated spoken replies.+ `GEV_VOICE_LOG_CONTENT=1` retains them for explicit content debugging.++ - Unqualified Alps searches use the bundled European range for navigation+ and annotations instead of a same-named peak returned by a geocoder.+ Coordinates, supplied presets and geographically qualified place names+ keep their precedence; annotation proximity and containment guards remain.+ - Contacts analyst follow-ups retain the snapshot's distance ranking rather+ than switching to the camera. Requested radii and explicit scopes remain+ authoritative, and a request for a list still requires an analyst query.+ Analyst speech names stale or degraded feeds and withholds authoritative+ counts when unavailable. The existing NOTES disclosure preserves complete,+ deduplicated coverage and source caveats, including crowded results.+ - The voice card shows analyst counts ("At least 250,000 aircraft …") with+ their scope, feed window and caveats, and marks partial answers. Analyst+ speech uses the same deterministic headline, preserves lower bounds and says+ when an answer is partial. Follow-ups retain unanswered-layer coverage, and+ keep the original scope label when they narrow a remembered result.+ Contacts-window answers read one immutable panel snapshot, mark a 20,000-row+ layer cap as a lower bound, and commit that displayed cohort only after+ cancellation checks pass. Concurrent analyst calls from one model response+ remain independent; a stopped or replaced user turn still cancels them.+ - Voice answers are shorter and fill slow work instead of going silent. Slow+ or multi-step requests may open with one short spoken plan; instant ones+ just happen. Tool results carry a code-built `say` line and a `display`+ card: sources and notes stay on screen, a caveat is spoken only when it+ changes the answer, and "at least" and partial answers are always said. A card above the mic shows captions, the plan's steps and the+ result. When a tool that reports steps (layers, place lookups, outlines,+ nearest-aircraft) is still running after 1.5 s its current step is spoken+ once; others say "still working" once after 8 s. A soft+ tick plays in push-to-talk. Holding Space while the assistant talks cuts it+ off. Each turn writes latency and speech figures to the debug log+ (`node scripts/voice-turn-spans.mjs`). Captions of what you say are+ counted in the voice cost meter; the debug log leaves out what was said+ unless `GEV_VOICE_LOG_CONTENT=1`.+ - Point and ask: hold Space with the cursor on an aircraft, ship or spot on+ the map and say "what's that", "track that one" or "how many flights+ around here". A reticle marks the point and the voice card shows what+ "this" meant. In open mic it works when you have just moved the cursor+ there. "The second one" picks from the last numbered list. Asking about+ "the last one" resolves to the last of the five rows actually shown, and+ referent-only tracking calls are accepted while empty targets are rejected.+ Asking about+ bare ground up close gives the assistant a small crop of the map around the+ point. A slow render gets one bounded second frame request, while hidden,+ stale, moved-camera, invalid and oversized captures still fail closed.++ ## [Unreleased]++ - Stdio servers from one install share a panel key so a page read from one+ process can make requests through another. Concurrent malformed-key repairs+ now select one winner; unavailable storage or a busy repair retains the+ logged per-process fallback. Thanks to [Jibran Tahir](https://github.com/jibraaan)+ for #958, [MarvinNL046](https://github.com/MarvinNL046) for the report and+ proposed diagnosis in #927, and [kvnloo](https://github.com/kvnloo) for identifying+ the repair race. Windows/Claude Desktop Cowork confirmation remains outstanding.++ - Street Level: a street-level imagery layer modelled on the iD editor's photo+ overlay, with Mapillary as its first provider (free client token, CC BY-SA 4.0+ imagery). One right-rail panel holds a chip per provider, shared 360°/flat and+ captured-since filters, and an embedded viewer with EXPAND, FIT/FILL and+ FOLLOW (Google 3D only). Coverage lines and image cones are drawn from orbit+ down to a single street; on Google 3D they sit on the bare earth, refined+ against the rendered mesh near the camera, so trees and buildings hide them.+ Share links carry the provider switches, the filters and the panel's collapsed+ state. A server proxy caches Mapillary coverage tiles (24 h, 1 GiB on disk),+ refuses cross-site requests, rate-limits per IP and backs off when Mapillary+ rejects the token or rate-limits.++ - The CCTV and Street Level panels are portable: drag the header to float the+ panel, resize it from any edge or corner, and double-click the header to dock+ it again. The position persists across reloads.++ - Add Norway's road cameras from Statens vegvesen as a CCTV pack. The camera+ list is one keyless GeoJSON request to the agency's OGC API view of its+ DATEX 3.1 CCTV table, so no DATEX account is needed. Every working camera+ loads (~850; faulty ones are dropped) under one "Norway" category, and the+ ~135 working cameras that publish HLS play as live video through the existing in-memory+ relay with the still as fallback. Frames and manifests are pinned to each+ camera's own path on the agency hosts. `CCTV_VEGVESEN_ENABLED=0` disables+ the pack, `CCTV_VEGVESEN_MAX_SOURCES` caps it (keeping cameras nearest the+ largest cities) and `CCTV_VEGVESEN_VIDEO=0` keeps stills only. Attributed+ under NLOD 2.0.++ ## [0.2.1] — 2026-10-02 — God's Eye View through Your Agent (with security fixes and other features)++ - Ship each bundled data pack once. The region, marine, admin-boundary,+ county, military-name and neighborhood packs were emitted twice by the+ production build, as the JSON the browser fetches and as an unused+ JavaScript copy; `dist/` drops from 54 MB to 42 MB. Under Node the loader+ reads the JSON file directly (reporting that Node 24.14 or newer is needed+ on a runtime too old to do so), and a test keeps app code from importing a+ pack as a module.++ - Apply the Host check before the app's own routes. Vite installs its Host+ check after the middleware that plugins add, so the provider and `/api`+ routes used to answer any Host, including a DNS-rebinding name, in every+ mode. A first-running middleware now applies the same allowed hosts on the+ dev and preview servers.++ - Refuse cross-site browser requests to the cost-bearing and log endpoints+ (`/api/realtime/token`, `/api/openai/hud-summary`,+ `/api/google/nearby-places`, `/api/google/text-search`,+ `/api/realtime/debug-log`): a foreign or opaque+ Origin, a cross-site `Sec-Fetch-Site`, or proxy forwarding headers get 403,+ while loopback tools and LAN use keep working. The dev and preview servers+ send one shared Content-Security-Policy (James Sumpter, #242).++ - The voice debug log records the server's own time: a record can no longer+ supply its `loggedAt`. The dev and preview servers also send+ `X-Content-Type-Options: nosniff` (findings by Sunil, #710).++ - Keep the Host-header check when binding to all interfaces. `HOST=0.0.0.0`+ used to accept any Host; the dev and preview servers now accept IP+ addresses, `localhost` and the LAN hostnames listed in `GEV_ALLOWED_HOSTS`+ (suffix and wildcard entries are ignored), which also keeps DNS-rebinding+ names out in LAN mode. The `.local` suffix is no longer accepted by default;+ list such a name explicitly (Puspo Aditya, #97, fixes #21).++ - Throttle the cost-bearing proxies by default instead of on request. The+ OpenAI endpoints (`/api/realtime/token`, `/api/openai/hud-summary`) now allow+ 30 requests per minute per client IP and the Google Places endpoints+ (`/api/google/nearby-places`, `/api/google/text-search`) 120 — the caps the+ Pinokio build already ships, so the packaged app is unaffected and only an+ unconfigured server changes, from unlimited to what the product already runs+ with. `GEV_RATELIMIT_OPENAI_PER_MIN` and `GEV_RATELIMIT_GOOGLE_PER_MIN` still+ override the caps, and exactly `0` disables them; a value that cannot be read+ as a number now falls back to the default rather than to unlimited, so a typo+ cannot silently disarm the guard (daikaginza, #683).++ - Tighten the local MCP server and embed mode. The panel's `panel_request`+ needs the key in its MCP server's panel page, and refuses Provider+ Settings, credential and model endpoints, `/mcp` and development server+ routes in any letter case, encoding or dot suffix; panels on one server share six+ requests in flight, and further requests wait their turn. `/mcp` applies Provider Settings' proxy and sharing checks,+ requires a Host on the port it reached and an Origin from that host, and+ times out request bodies after 30 seconds; stdio honors+ `notifications/cancelled`. Embed mode is no longer framable unless+ `GEV_EMBED_FRAME_ANCESTORS` allows the framing page, and view answers go+ only to the origin that sent the view. SECURITY.md describes the MCP surface+ and the panel's browser keys.++ - Cockpit now enters on the existing matching map style while keeping one fixed,+ duplicate-free carousel over `Normal / CRT / NVG / FLIR / Anime / Noir / Snow`.+ Normal remains a real unfiltered option; Cockpit-only choices still restore+ the captured map style through both Exit Cockpit and Reset.+ - Cyber's compact right-rail and Cockpit utility buttons now center their glyphs+ vertically and share the same inset and edge alignment.+ - Keep Cyber Voice help/error popups and Location/Visual Presets pins clear of+ their decorative frames. Leave space above attribution for its full logo row.+ - Add an intentionally future-facing, opt-in panel surface contract for new+ panels to inherit compatible Normal, Cyber and Cockpit styling. Its first+ production adopter will land separately after this change.+ - Restore the user's previous visual preset when they explicitly switch from+ Cyber to another HUD layout, without overriding scene or shared-link state.+ - Move the aligned Cyber side-panel rails upward on desktop so the left stack+ clears the lower coordinate card; keep Cockpit's independent visor layout.++ ## [0.2.0] — 2026-10-02 — God's Eye View through Your Agent++ - Show God's Eye View inside AI conversations. Answers that can be shown+ include a view (camera, layers, style, map, marks, something to follow),+ and `show_in_gods_eye_view` displays it as the live globe in clients that+ support MCP Apps, such as Claude Desktop and the Codex and ChatGPT desktop+ apps, and as a link everywhere else. The panel loads the app's panel build+ (`npm run build:panel`) and its data through the MCP server, so a local+ server needs no HTTPS or tunnel. `?embed=1` shows the globe alone for pages+ that frame the app.++ - Add tools for language-model clients and a local MCP server, served over+ stdio by `npm run mcp` and over HTTP at `/mcp` on the development and preview+ servers for local requests only. `npm run mcp`+ serves earthquake, active-fire, launch, aircraft, ship, satellite, camera, radio,+ place, routing, bike-share, transit, traffic, weather, cyclone, fire-perimeter,+ terrain, installation and map-feature queries, plus a situation brief, over+ stdio to clients such as Claude Code, reading+ from a running app. Tools are defined+ once in `gods-eye-view/tools`, reuse the layers' source factories, and are+ exposed through the protocol adapter in `gods-eye-view/tools/mcp`. The+ catalog also covers weather maps, wind, recent imagery, submarine cables,+ license plate reader cameras, datacenters and dams, the Bhote Koshi flood,+ military awareness and links that open the app over an area with layers on.+ Voice offers the same queries next to its app actions.+- Public Overpass instances are no longer used by default. Street Trafficroads come from TomTom flow tiles, OpenFreeMap vector tiles, or both, chosenon the layer row (TomTom / OSM / Hybrid) or with `?trafficRoads=`. With adiff --cc DATA_SOURCES.mdindex 3161d0e21,0b8eac358..cd2c88cbd--- a/DATA_SOURCES.md+++ b/DATA_SOURCES.md@@@ -54,7 -55,7 +55,8 @@@ How to read this| **Fintraffic / Digitraffic (weathercams)** | CCTV camera catalog + frames, Finland | [CC BY 4.0](https://www.digitraffic.fi/en/terms-of-service/) — attribution REQUIRED | "Fintraffic / digitraffic.fi, license CC BY 4.0" || **DriveBC** (Government of British Columbia) | CCTV camera catalog + frames, British Columbia highways | [Open Government Licence – British Columbia](https://www2.gov.bc.ca/gov/content/data/open-data/open-government-licence-bc) — attribution REQUIRED | "DriveBC. Contains information licensed under the Open Government Licence – British Columbia" || **Open Calgary** (`data.calgary.ca`) | CCTV camera catalog + frames, Calgary | [Open Government Licence – City of Calgary](https://data.calgary.ca/stories/s/Open-Calgary-Terms-of-Use/u45n-7awa) — attribution REQUIRED | "Contains information licensed under the Open Government Licence – City of Calgary" |+| **King County Road Services** (`services.arcgis.com`, King County GIS) | CCTV camera catalog + frames, unincorporated King County WA road network | [KCGIS Center terms](https://kingcounty.gov/en/dept/kcit/data-information-services/gis-center/about/terms-conditions-copyrights) — attribution required; public ArcGIS layer | "King County Road Services" (partner-city cameras name their owner) |+ | **Statens vegvesen** (catalog `ogckart-sn1.atlas.vegvesen.no`, frames `kamera.atlas.vegvesen.no`, HLS `kamera.vegvesen.no`) | CCTV camera catalog + frames + live HLS video, Norway road cameras | [NLOD 2.0](https://data.norge.no/nlod/en/2.0) — attribution REQUIRED | "Contains data under the Norwegian licence for Open Government data (NLOD) distributed by Statens vegvesen" || **GBFS (Lyft / BCycle)** | Bikeshare availability | Per-feed (attribution-only) | Credit the operator (e.g. Austin BCycle) + its `license_url` || **MBTA / MassDOT** (cdn.mbta.com) | Transit layer live vehicles and up to 15 minutes of recently observed positions, Greater Boston | MBTA / MassDOT open realtime vehicle data, used for the live view and up to fifteen minutes of recently observed positions; published for developer use and not against their use. | Attribution to MBTA / MassDOT (courtesy text) || **CapMetro** (data.texas.gov) | Transit layer live vehicles, Austin TX | CapMetro open realtime vehicle data, used for the live view; published for developer use and not against their use. | Attribution to CapMetro (courtesy text) |@@@ -89,7 -90,7 +91,8 @@@ The optional Local ADS-B layer and the- **Warendorf webcam.** The Stadt Warendorf Marktplatz webcam, registered from the curated `config/cctv_sources.warendorf.json` (the Kreis Warendorf registration-office cameras from the contributing PR are indoor waiting rooms and were left out); only the municipal image host is proxied, frames are fetched at request time and never stored or redistributed. Disable with `CCTV_WARENDORF_ENABLED=0`.- **Live Traffic NSW cameras.** The camera list is the keyless public `data.livetraffic.com/cameras/traffic-cam.json` feed (Transport for NSW open data, CC BY 4.0); frames are stills on `webcams.transport.nsw.gov.au`, and only that host is registered. That image host answers non-browser clients with an HTML placeholder, so the proxy identifies as a browser for that one host and as itself everywhere else. Frames are fetched at request time and never stored or redistributed. Disable with `CCTV_NSW_ENABLED=0`.- **Open Calgary traffic cameras.** Keyless. The camera list is the public Socrata dataset `k7p9-kppz` on `data.calgary.ca`; frames are stills on the city's own `trafficcam.calgary.ca` host, and only that host is registered. Most rows publish an `http://` frame URL and the host redirects those to HTTPS, so URLs are upgraded and pinned to that origin before registration. Frames are fetched at request time and never stored or redistributed. The dataset publishes no camera facing: the `quadrant` field and the quadrant suffix on each camera name are Calgary's address grid, not a bearing, so headings use the shared id-hash fallback at low confidence and are corrected with the in-app calibration gizmo. The licence requires the attribution statement above. Disable with `CCTV_CALGARY_ENABLED=0`.+- **King County road cameras.** Keyless. The camera list is one public ArcGIS FeatureServer GeoJSON query (King County DOT Road Services, "King County and WSDOT Traffic Cameras"). The `outFields` list is explicit on purpose: the layer also carries asset-administration columns — including staff names — that are never fetched. Only live, active cameras with frames on the county's own `info.kingcounty.gov` image handler are registered (the feed writes `http://`; the handler serves HTTPS, so URLs are upgraded and pinned before registration). WSDOT-owned rows in the layer are skipped so a camera never appears twice when a statewide WSDOT pack is present; the few city-owned cameras the county hosts (Redmond, Sammamish, Newcastle, Snoqualmie) carry their owner as the per-camera credit. The layer publishes no facing, so headings use the shared id-hash fallback at low confidence. Uniquely, the county publishes each camera's hardware `Manufacturer`/`Model` (Cohu 3950/3965, Bosch AUTODOME, Axis PTZ domes); both are carried on the source (and served by `/api/cctv/sources`) as `model` and `manufacturer` for identified-hardware consumers. Frames are fetched at request time and never stored or redistributed. Disable with `CCTV_KINGCOUNTY_ENABLED=0`.+ - **Statens vegvesen road cameras.** Keyless. The camera list is one GeoJSON request to the OGC API Features view of the official DATEX 3.1 CCTV site table (`ogckart-sn1.atlas.vegvesen.no/ogc/features/v1/collections/datex_3_1:CctvSimple/items`), so no DATEX account is needed; frames are stills on `kamera.atlas.vegvesen.no/api/images/<cameraId>`, and only that exact path per camera is registered. Cameras the feed reports as faulty are dropped. About 135 working cameras also publish live HLS (`kamera.vegvesen.no/public/<cameraId>/manifest.m3u8`, MPEG-TS); those play as live video through the bounded in-memory HLS relay, with the still as the snapshot fallback, and only that exact manifest path per camera is registered. `CCTV_VEGVESEN_VIDEO=0` keeps every camera on stills. `orientationDescription` names the place a camera faces, not a bearing, so it goes into the label and headings use the id-hash fallback at low confidence. By default every live camera loads (~850); `CCTV_VEGVESEN_MAX_SOURCES` (8–1000) lowers the cap, keeping the cameras nearest Oslo, Bergen, Stavanger, Trondheim, Kristiansand, Bodø and Tromsø and `CCTV_VEGVESEN_ENABLED=0` turns the pack off. Frames are fetched at request time and never stored or redistributed. The NLOD attribution is registered in the Data attribution popover.- **Camera frame content.** Public camera frames can contain people, vehicles and license plates, and the camera layer does nothing with them beyond putting them on the map. A successful upstream response is relayed as the provider served it: nothing in the camera pipeline blurs, redacts, enhances or restores it, and nothing there runs face, plate or object detection or otherwise recognises or classifies what is in the picture. (The ALPR layer described below maps where plate-reader cameras are, from locations contributors tagged in OpenStreetMap; it reads nothing from any camera frame.) When an upstream has no frame for a camera, what you see instead is a Google Street View still or the app's own placeholder card; the panel's source badge names which of them you are looking at, and a refresh that fails after a frame has arrived leaves the last good picture on screen rather than replacing it. The browser resamples each frame for display: onto a fixed 1920x1080 surface for the camera's projection plane in the scene, and onto a 192x108 canvas for the small ambient card. That scaling is the only change made to the picture, and the only pixels the camera layer reads back are a 64x36 downscale hashed to tell whether the picture has changed. Live streams are piped through; the still path reads the image into memory to pass it on — TxDOT wraps its JPEG in a JSON envelope, which is decoded there — and no frame is written to disk (the disk cache, `.gev-cache/`, holds feed JSON for other layers and never camera imagery). Outside that pipeline, the voice assistant is the one feature that sends imagery anywhere: when it answers a question about what is in view it may attach a downscaled screenshot of the rendered scene — including any camera plane on screen — to the request it sends to the voice model. Frames are fetched only from server-registered camera URLs — a client cannot hand the proxy a URL (see [SECURITY.md](SECURITY.md)). What the app does stays inside the line README draws: no named-person search, no face recognition, no tracking individuals.- **Transit (GTFS-Realtime).** The proxy requests only registered operator feeds, validates redirects, bounds responses, and uses conditional requests, short snapshot caching and failure backoff. All seven registered regions are live-enabled; each can be disabled independently. Vehicles use delayed playback between reports, with report age and waiting states shown separately. Session-local selected trails are available for every feed. MBTA additionally retains up to 15 minutes of recently observed positions in the running proxy, so available history can survive a browser reload; server restart clears it. History reads never fetch upstream, and other feeds have no proxy retention. Nothing is archived to disk or collected in the background. Operator text credits are included as a courtesy and do not imply endorsement. Heights are aligned to work with Google 3D tiles; subway markers are shown at street level because these feeds do not supply depth.- **Radio Browser.** `/api/radio/stations` discovers official API mirrors, makes bounded and coalesced healthy/geolocated HTTPS-station queries, caches the normalized public-domain directory for 45 minutes, and may serve the last good catalog for up to seven days during an outage. Refreshes must meet minimum accepted-query and station coverage before replacing a warm catalog; schema-valid responses whose rows all fail the product's health policy do not count as successful queries. A usable partial cold catalog is explicitly `DEGRADED`, and malformed or empty successful payloads are rejected atomically. Every directory and click-count request rejects redirects, validates all resolved addresses as globally routable (including reserved/documentation IPv4 and special/non-global IPv6 exclusions), and pins the TLS connection to a validated address. Only MP3/AAC non-HLS directory rows with public HTTPS stream targets are returned; favicons are intentionally omitted. Pressing play connects one browser audio element directly to the selected broadcaster and calls the directory's click counter through known-ID-only `POST /api/radio/click/:uuid`. GEV never proxies, caches, records, bundles, or redistributes audio. Radio Browser supplies station-level tags, not dependable current-song or upcoming-program metadata, so Radio filtering never claims either. Direct playback exposes the listener's IP address to the broadcaster, whose own stream terms apply.diff --cc README.mdindex 3a84bd086,5a4ab8b24..b3a6a06b2--- a/README.md+++ b/README.md@@@ -279,31 -279,34 +279,34 @@@ _Ask for radio near anywhere and the gl---+ **💬 Or ask from Claude and Codex.** God's Eye View is also an MCP server: ask Claude Desktop, Codex or ChatGPT desktop to show a place, and the live globe opens right in the conversation. Setup takes a minute — see [docs/MCP_SETUP.md](docs/MCP_SETUP.md).+## 🛰️ What's on the Globe- Nineteen layers and map sources. **Seventeen have a keyless path.** Some offer additional capabilities with a provider key. (🟢 no key · 🟡 free key · 🔴 metered.)-- | Layer | What you get | Source | Auth |- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------- |- | 🗺️ **Map Stack** | Esri satellite imagery, Google Photorealistic 3D, OSM, plus additional ion-hosted stacks | Esri / Google / Ion / OSM | 🟢 Esri satellite + OSM · 🟡 ion-hosted Google 3D + world terrain · 🔴 direct Google + place search |- | ✈️ **Live Flights** | 11,000+ live aircraft + route history | OpenSky + adsb.lol | 🟢 (🟡 optional for more polling credits) |- | 🎖️ **Military Flights** | ADS-B military traffic in amber | adsb.lol | 🟢 |- | 🚢 **Live Vessels** | Thousands of ships worldwide | AISStream | 🟡 |- | 🛰️ **Satellites** | 838-object catalog, color-coded by class with a live legend — the **DENSE** chip drops in the whole Starlink shell | CelesTrak | 🟢 |- | 🌍 **Earthquakes** | Global seismic activity, last 24h | USGS | 🟢 |- | 🚗 **Traffic** | Simulated vehicles on OSM roads. With TomTom, live flow speeds drive the simulation and congestion colors below ~8 km; individual vehicle positions are not live observations | TomTom + OSM | 🟢 simulation · 🟡 live flow speeds |- | 📹 **CCTV Mesh** | ~3,600 public cameras projected _into_ the 3D space — Austin · Texas (TxDOT) · California (Caltrans) · London (TfL) · Ontario (511) · Finland (Fintraffic) · British Columbia (DriveBC) · Estonia (Tallinn, Tarktee) · Delaware (DelDOT live video) · New South Wales (Live Traffic NSW) · Calgary · King County (WA). Positions are published; poses are estimated priors **you calibrate by dragging a gizmo on the camera itself** | City APIs | 🟢 |- | 📷 **Mapped ALPR Cameras** | License-plate-reader camera locations tagged by OpenStreetMap contributors, loaded one city-sized view at a time, with **SHOW NEAREST**. Locations and tags only: no plate data, no video | OpenStreetMap (incl. DeFlock mapping) | 🟢 |- | 📻 **Radio** | Geolocated world radio with an **analog tuner** — drag the needle across up to 750 stations and the globe flies to each broadcaster | Radio Browser / broadcasters | 🟢 |- | 🚌 **Transit** | Live buses, trams, metros, trains and ferries with delayed playback between reports, selected-vehicle trails, and mode-coloured DETECT labels — Boston, Austin, Minneapolis, Helsinki, the Netherlands, Norway, South East Queensland | Operator GTFS-Realtime feeds | 🟢 |- | 🚲 **Bikeshare** | Live station availability | GBFS | 🟢 |- | 🧭 **Directions** | Click A and B on the globe for a street-following drive, walk or cycle route draped on the terrain with turn-by-turn steps — then FLY the camera along it. No key, no geocoder, no mic | OSRM on FOSSGIS servers (OpenStreetMap) | 🟢 |- | 🔥 **Active Fires** | Live NASA FIRMS detections, trailing 24h | NASA FIRMS | 🟡 |- | 🚀 **Space Missions** | Rolling 30-day launches with payload, stage, and recovery detail | Launch Library 2 | 🟢 (🟡 optional token raises the allowance) |- | 🎖️ **Mapped Installations** | Viewport-bounded military-site context from community mapping — incomplete by nature, and labeled that way | OpenStreetMap | 🟢 |- | 🌬️ **Wind** | Animated 10 m forecast wind with an optional speed, temperature or pressure color field and a reading at map center | NOAA GFS / ECMWF IFS | 🟢 |- | 🌦️ **Observed Weather** | Rain radar (contiguous US), Satellite clouds (GOES regional or global infrared, Clouds only or Full image) and Lightning density (Americas and Pacific) on one history timeline | NOAA nowCOAST | 🟢 |- | 🌀 **Cyclones** | Advisory positions, forecast tracks and uncertainty cones for the Atlantic and eastern/central North Pacific | NOAA NHC / CPHC | 🟢 |+ Twenty layers and map sources. **Seventeen have a keyless path.** Some offer additional capabilities with a provider key. (🟢 no key · 🟡 free key · 🔴 metered.)++ | Layer | What you get | Source | Auth |+ | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------- |+ | 🗺️ **Map Stack** | Esri satellite imagery, Google Photorealistic 3D, OSM, plus additional ion-hosted stacks | Esri / Google / Ion / OSM | 🟢 Esri satellite + OSM · 🟡 ion-hosted Google 3D + world terrain · 🔴 direct Google + place search |+ | ✈️ **Live Flights** | 11,000+ live aircraft + route history | OpenSky + adsb.lol | 🟢 (🟡 optional for more polling credits) |+ | 🎖️ **Military Flights** | ADS-B military traffic in amber | adsb.lol | 🟢 |+ | 🚢 **Live Vessels** | Thousands of ships worldwide | AISStream | 🟡 |+ | 🛰️ **Satellites** | 838-object catalog, color-coded by class with a live legend — the **DENSE** chip drops in the whole Starlink shell | CelesTrak | 🟢 |+ | 🌍 **Earthquakes** | Global seismic activity, last 24h | USGS | 🟢 |+ | 🚗 **Traffic** | Simulated vehicles on OSM roads. With TomTom, live flow speeds drive the simulation and congestion colors below ~8 km; individual vehicle positions are not live observations | TomTom + OSM | 🟢 simulation · 🟡 live flow speeds |-| 📹 **CCTV Mesh** | ~3,900 public cameras projected _into_ the 3D space — Austin · Texas (TxDOT) · California (Caltrans) · London (TfL) · Ontario (511) · Finland (Fintraffic) · British Columbia (DriveBC) · Estonia (Tallinn, Tarktee) · Delaware (DelDOT live video) · New South Wales (Live Traffic NSW) · Calgary · Norway (Statens vegvesen). Positions are published; poses are estimated priors **you calibrate by dragging a gizmo on the camera itself** | City APIs | 🟢 |++| 📹 **CCTV Mesh** | ~3,900 public cameras projected _into_ the 3D space — Austin · Texas (TxDOT) · California (Caltrans) · London (TfL) · Ontario (511) · Finland (Fintraffic) · British Columbia (DriveBC) · Estonia (Tallinn, Tarktee) · Delaware (DelDOT live video) · New South Wales (Live Traffic NSW) · Calgary · Norway (Statens vegvesen) · King County (WA). Positions are published; poses are estimated priors **you calibrate by dragging a gizmo on the camera itself** | City APIs | 🟢 |+ | 📷 **Mapped ALPR Cameras** | License-plate-reader camera locations tagged by OpenStreetMap contributors, loaded one city-sized view at a time, with **SHOW NEAREST**. Locations and tags only: no plate data, no video | OpenStreetMap (incl. DeFlock mapping) | 🟢 |+ | 📷 **Street Level** | Street-level photos behind one panel, one chip per provider: coverage on the streets, image cones, an embedded viewer and **FOLLOW**. Mapillary first; Panoramax, KartaView and Google Street View planned | Mapillary | 🟡 Mapillary client token |+ | 📻 **Radio** | Geolocated world radio with an **analog tuner** — drag the needle across up to 750 stations and the globe flies to each broadcaster | Radio Browser / broadcasters | 🟢 |+ | 🚌 **Transit** | Live buses, trams, metros, trains and ferries with delayed playback between reports, selected-vehicle trails, and mode-coloured DETECT labels — Boston, Austin, Minneapolis, Helsinki, the Netherlands, Norway, South East Queensland | Operator GTFS-Realtime feeds | 🟢 |+ | 🚲 **Bikeshare** | Live station availability | GBFS | 🟢 |+ | 🧭 **Directions** | Click A and B on the globe for a street-following drive, walk or cycle route draped on the terrain with turn-by-turn steps — then FLY the camera along it. No key, no geocoder, no mic | OSRM on FOSSGIS servers (OpenStreetMap) | 🟢 |+ | 🔥 **Active Fires** | Live NASA FIRMS detections, trailing 24h | NASA FIRMS | 🟡 |+ | 🚀 **Space Missions** | Rolling 30-day launches with payload, stage, and recovery detail | Launch Library 2 | 🟢 (🟡 optional token raises the allowance) |+ | 🎖️ **Mapped Installations** | Viewport-bounded military-site context from community mapping — incomplete by nature, and labeled that way | OpenStreetMap | 🟢 |+ | 🌬️ **Wind** | Animated 10 m forecast wind with an optional speed, temperature or pressure color field and a reading at map center | NOAA GFS / ECMWF IFS | 🟢 |+ | 🌦️ **Observed Weather** | Rain radar (contiguous US), Satellite clouds (GOES regional or global infrared, Clouds only or Full image) and Lightning density (Americas and Pacific) on one history timeline | NOAA nowCOAST | 🟢 |+ | 🌀 **Cyclones** | Advisory positions, forecast tracks and uncertainty cones for the Atlantic and eastern/central North Pacific | NOAA NHC / CPHC | 🟢 |**Weather, keyless.** **Wind** animates 10 m forecast flow from NOAA GFS or ECMWF IFS, with an optional color field and a reading at map center. **Rain radar**, **Satellite clouds** and **Lightning density** are observations on one history timeline in the **WEATHER** panel (step back, **Play**, **Latest**); **Cyclone advisories** draw NHC and CPHC positions, forecast tracks and cones. On Google 3D Tiles the observed layers float above the city as translucent shells, sharpened around your view.diff --cc docs/CURRENT-STATE.mdindex 098b7d25c,ee3bfbdb2..b39bd892e--- a/docs/CURRENT-STATE.md+++ b/docs/CURRENT-STATE.md@@@ -2851,7 -3009,7 +3009,7 @@@ its criteria cannot be silently ignored| Satellites | CelesTrak | `src/data/satellites.js` | `/api/celestrak` | 120s || Space Missions (30d) | Launch Library 2 + CelesTrak | `src/data/rocketLaunches.js` | `/api/launches` + `/api/celestrak/active` | 5 min || Traffic | Selectable TomTom / OpenStreetMap / Hybrid roads; optional TomTom flow (BYOK) | `src/data/traffic.js` | browser-direct OpenFreeMap tiles; `/api/tomtom` for flow | viewport-driven; capped tile cache |- | CCTV | Austin + Caltrans (CA) + TfL London + Ontario 511 + Fintraffic (FI) + DriveBC (BC) + TxDOT (TX) + Estonia (Tallinn, Tarktee) + Live Traffic NSW + Open Calgary Open Data + King County (WA) Open Data + Street View fallback | `src/data/cctv.js` | `/api/cctv` | 10s (active) |-| CCTV | Austin + Caltrans (CA) + TfL London + Ontario 511 + Fintraffic (FI) + DriveBC (BC) + TxDOT (TX) + Estonia (Tallinn, Tarktee) + Live Traffic NSW + Open Calgary Open Data + Statens vegvesen (NO, stills + live HLS) + Street View fallback | `src/data/cctv.js` | `/api/cctv` | 10s (active) |++| CCTV | Austin + Caltrans (CA) + TfL London + Ontario 511 + Fintraffic (FI) + DriveBC (BC) + TxDOT (TX) + Estonia (Tallinn, Tarktee) + Live Traffic NSW + Open Calgary Open Data + Statens vegvesen (NO, stills + live HLS) + King County (WA) Open Data + Street View fallback | `src/data/cctv.js` | `/api/cctv` | 10s (active) || Radio | Radio Browser (public-domain station directory) | `src/data/radio.js` | `/api/radio/stations`, `/api/radio/click/:uuid` | 45 min directory refresh || Transit 🚌 | Operator GTFS-Realtime VehiclePositions (7 keyless regions, `src/data/transitFeeds.js`) | `src/layers/transit/` via `src/app/layers/transit.js` | `/api/transit` | 15s (poll + delayed playback) || Bikeshare 🚲 | GBFS (Lyft + BCycle) | `src/data/bikeshare.js` | `/api/gbfs` | 60s |diff --cc server/providers/cctv/catalog.jsindex ec5cf05b5,9bc3b70ec..87e49c650--- a/server/providers/cctv/catalog.js+++ b/server/providers/cctv/catalog.js@@@ -18,7 -18,7 +18,8 @@@ importloadNswSourcesFromOpenData,loadCalgarySourcesFromOpenData,loadDelDOTSourcesFromOpenData,+ loadKingCountySourcesFromOpenData,+ loadVegvesenSourcesFromOpenData,} from './sources.js';/** Env kill switch: unset or anything but "0" means enabled. */@@@ -93,11 -93,11 +94,16 @@@ const LIVE_PACKS =enabled: () => envEnabled('CCTV_DELDOT_ENABLED'),load: loadDelDOTSourcesFromOpenData,},+ {+ name: 'kingcounty',+ enabled: () => envEnabled('CCTV_KINGCOUNTY_ENABLED'),+ load: loadKingCountySourcesFromOpenData,+ },+ {+ name: 'vegvesen',+ enabled: () => envEnabled('CCTV_VEGVESEN_ENABLED'),+ load: loadVegvesenSourcesFromOpenData,+ },];/*** Load CCTV sources from a local JSON file (CCTV_SOURCES_FILE env or default).diff --cc server/providers/cctv/sources.jsindex 3996f37f1,7ecd3434d..df7395cd9--- a/server/providers/cctv/sources.js+++ b/server/providers/cctv/sources.js@@@ -59,10 -59,12 +59,16 @@@ importDELDOT_CCTV_URL,DEFAULT_DELDOT_MAX_SOURCES,DELDOT_ANCHORS,+ KING_COUNTY_CAMERAS_URL,+ KING_COUNTY_IMAGE_ORIGIN,+ DEFAULT_KING_COUNTY_MAX_SOURCES,+ KING_COUNTY_ANCHORS,+ DEFAULT_VEGVESEN_CCTV_URL,+ VEGVESEN_IMAGE_ORIGIN,+ VEGVESEN_VIDEO_URL,+ DEFAULT_VEGVESEN_MAX_SOURCES,+ VEGVESEN_MAX_CATALOG_BYTES,+ NORWAY_ANCHORS,} from './constants.js';import {toFiniteNumber,@@@ -1706,128 -1709,157 +1713,283 @@@ export async function loadDelDOTSources}}+/** Rough King County, WA bounding box. */+function isLikelyKingCountyCoordinate(lat, lon) {+ return (+ Number.isFinite(lat) &&+ Number.isFinite(lon) &&+ lat >= 47.0 &&+ lat <= 48.0 &&+ lon >= -123.1 &&+ lon <= -121.0+ );+}++/**+ * Fetch King County road cameras (Washington State). Keyless: one public+ * ArcGIS FeatureServer GeoJSON query (King County DOT Road Services), with an+ * explicit `outFields` list so the layer's asset-administration columns are+ * never fetched. Only cameras that are live and active (`Live`,+ * `CurrentStatus`) with a positive integer id, finite in-county coordinates,+ * and a frame on the county's own image handler are kept. WSDOT-owned rows in+ * the layer are skipped — the statewide WSDOT pack is their home — while the+ * handful of city-owned cameras the county hosts (Redmond, Sammamish,+ * Newcastle, Snoqualmie) keep their owner as the per-camera credit,+ * DriveBC-style. The layer publishes no facing, so every heading is the id+ * hash at low confidence.+ *+ * Uniquely among the packs, the county publishes each camera's hardware+ * `Manufacturer`/`Model`; the model string (whitespace-collapsed — the feed+ * carries stray newlines) rides along as the source's `model` for+ * identified-hardware consumers.+ *+ * @returns {Promise<Array<object>>} Normalized camera source objects.+ */+export async function loadKingCountySourcesFromOpenData() {+ try {+ const resp = await fetch(KING_COUNTY_CAMERAS_URL, {+ headers: { Accept: 'application/json' },+ signal: AbortSignal.timeout(CCTV_SOURCE_FETCH_TIMEOUT_MS),+ });+ if (!resp.ok) {+ console.warn('[CCTV] King County camera download failed:', resp.status);+ return [];+ }+ const payload = await resp.json();+ const rows = Array.isArray(payload?.features) ? payload.features : [];++ const cameras = [];+ for (const row of rows) {+ const attrs = row?.properties;+ const rawId = attrs?.AssetID;+ if (!Number.isSafeInteger(rawId) || rawId <= 0) continue;+ if (attrs.Live !== 1) continue;+ if (String(attrs.CurrentStatus || '').trim() !== 'Active') continue;+ const owner = String(attrs.Owner || '').trim();+ // WSDOT-owned rows belong to the statewide WSDOT pack; skipping them+ // here keeps one camera from appearing twice on the globe.+ if (owner === 'WSDOT') continue;+ // The handler is served over HTTPS; the feed still writes http://.+ const imageUrl = String(attrs.ImageURL || '')+ .trim()+ .replace(/^http:\/\/info\.kingcounty\.gov\//, KING_COUNTY_IMAGE_ORIGIN);+ if (!imageUrl.startsWith(KING_COUNTY_IMAGE_ORIGIN)) continue;+ const [lon, lat] = Array.isArray(row?.geometry?.coordinates)+ ? row.geometry.coordinates+ : [];+ if (!isLikelyKingCountyCoordinate(lat, lon)) continue;++ const cameraId = `kingcounty-${rawId}`;+ const model = String(attrs.Model || '')+ .replace(/\s+/g, ' ')+ .trim();+ const manufacturer = String(attrs.Manufacturer || '')+ .replace(/\s+/g, ' ')+ .trim();+ const camera = {+ id: cameraId,+ name:+ String(attrs.Location || '').trim() || `King County camera ${rawId}`,+ city: 'King County',+ cityId: 'king-county',+ provider: 'King County Road Services',+ lat,+ lon,+ headingDeg: fallbackHeadingFromId(cameraId),+ headingConfidence: 'low',+ // The low-confidence pose personality shared by the other packs.+ pitchDeg: -18,+ fovDeg: 44,+ rangeM: 145,+ mountHeightM: 8,+ feedType: 'image',+ url: imageUrl,+ snapshotUrl: imageUrl,+ sourceKind: 'kingcounty-open-data',+ license: 'King County GIS open data (KCGIS Center terms of use)',+ credit: owner && owner !== 'King County' ? owner : '',+ };+ if (model) camera.model = model;+ if (model && manufacturer) camera.manufacturer = manufacturer;+ cameras.push(camera);+ }++ const maxRaw = Number(+ process.env.CCTV_KINGCOUNTY_MAX_SOURCES ||+ DEFAULT_KING_COUNTY_MAX_SOURCES,+ );+ const maxCount = Number.isFinite(maxRaw)+ ? Math.max(8, Math.min(1200, Math.floor(maxRaw)))+ : DEFAULT_KING_COUNTY_MAX_SOURCES;+ const prioritized = prioritizeSources(+ cameras,+ maxCount,+ KING_COUNTY_ANCHORS,+ );+ console.log(+ `[CCTV] Loaded King County camera sources: ${cameras.length} published (using nearest ${prioritized.length})`,+ );+ return prioritized;+ } catch (error) {+ console.warn(+ '[CCTV] King County camera download error:',+ error?.message || error,+ );+ return [];+ }+}+++ /**+ * One Statens vegvesen `CctvSimple` feature -> one catalog source, or null.+ *+ * `orientationDescription` names the place the camera looks towards+ * ("Svelgen"), not a bearing, so it goes into the label and the heading uses+ * the shared id-hash fallback at low confidence, like Calgary and Fintraffic.+ * Cameras the feed reports as faulty are dropped. Cameras that publish HLS+ * get live video, with the still as the snapshot fallback.+ *+ * @param {object} feature - GeoJSON feature from the OGC items response.+ * @returns {?object}+ */+ export function vegvesenCameraToSource(feature) {+ if (!feature || typeof feature !== 'object') return null;+ const props = feature.properties;+ if (!props || typeof props !== 'object') return null;+ const availability = String(+ props['status.stillImageAvailability'] ?? '',+ ).trim();+ if (availability && availability !== 'videoOrImagesAvailable') return null;++ const coordinates = feature?.geometry?.coordinates;+ if (!Array.isArray(coordinates) || coordinates.length < 2) return null;+ const lon = toFiniteNumber(coordinates[0]);+ const lat = toFiniteNumber(coordinates[1]);+ if (!isLikelyNorwayCoordinate(lat, lon)) return null;++ const rawId = String(props.cameraId ?? '').trim();+ if (!/^[A-Za-z0-9_-]{1,40}$/.test(rawId)) return null;+ let image;+ try {+ image = new URL(String(props.stillImageUrl ?? ''));+ } catch {+ return null;+ }+ if (image.username || image.password) return null;+ const imageUrl = image.href;+ if (imageUrl !== `${VEGVESEN_IMAGE_ORIGIN}${rawId}`) return null;++ const cameraId = `no-vegvesen-${rawId.toLowerCase()}`;+ const place = String(props.description ?? '').trim() || `Kamera ${rawId}`;+ const towards = String(props.orientationDescription ?? '').trim();+ const road = String(props.roadNumber ?? '').trim();+ const name = towards && towards !== place ? `${place} → ${towards}` : place;+ // Live video when the camera publishes HLS on the agency's own host; the+ // still stays the snapshot fallback. CCTV_VEGVESEN_VIDEO=0 keeps stills only.+ const videoUrl =+ String(process.env.CCTV_VEGVESEN_VIDEO || '1').trim() !== '0' &&+ Number(props.videoServiceLevel) > 0 &&+ String(props.videoEncodingStandard ?? '').toLowerCase() === 'hls' &&+ String(props.videoUrl ?? '').trim() === VEGVESEN_VIDEO_URL(rawId)+ ? VEGVESEN_VIDEO_URL(rawId)+ : '';++ return {+ id: cameraId,+ name: road ? `${road} ${name}` : name,+ // One country-wide category in the camera picker, like Finland; the+ // place itself is already in the name.+ city: 'Norway',+ cityId: 'norway',+ provider: 'Statens vegvesen',+ lat,+ lon,+ headingDeg: fallbackHeadingFromId(cameraId),+ headingConfidence: 'low',+ pitchDeg: -18,+ fovDeg: 44,+ rangeM: 145,+ mountHeightM: 8,+ // KNOWN LIMITATION: the feed's coordinates are 2D, so this is one flat+ // prior for the whole country, while cameras run from sea level to+ // mountain passes near 1,000 m (Haukelifjell, Sjonfjellet, Rugeldalen).+ // The point-height prior and the client's one-shot ground snap correct it+ // where they resolve; on a stack where neither does (no 3D tiles), a pass+ // camera stays hundreds of metres below the terrain, the same risk the+ // Caltrans pack documents. A per-camera height (e.g. Kartverket's keyless+ // point-height API) would remove it.+ groundElevationM: 150,+ feedType: videoUrl ? 'hls' : 'image',+ url: videoUrl || imageUrl,+ snapshotUrl: imageUrl,+ sourceKind: 'vegvesen-datex',+ license:+ 'Contains data under the Norwegian licence for Open Government data (NLOD) distributed by Statens vegvesen',+ code: cameraDisplayCode(place.toUpperCase()),+ };+ }++ /**+ * Fetch Statens vegvesen (Norway) road cameras from the keyless OGC API+ * Features view of the DATEX 3.1 CCTV table. Frames are stills on+ * kamera.atlas.vegvesen.no.+ *+ * @returns {Promise<Array<object>>} Normalized camera source objects.+ */+ export async function loadVegvesenSourcesFromOpenData() {+ try {+ const endpoint = process.env.CCTV_VEGVESEN_URL || DEFAULT_VEGVESEN_CCTV_URL;+ const resp = await fetch(endpoint, {+ headers: { Accept: 'application/geo+json,application/json' },+ redirect: 'manual',+ signal: AbortSignal.timeout(CCTV_SOURCE_FETCH_TIMEOUT_MS),+ });+ const discard = async () => {+ try {+ await resp.body?.cancel();+ } catch {+ /* no-op */+ }+ return [];+ };+ if (resp.status >= 300 && resp.status < 400) {+ console.warn(+ '[CCTV] Vegvesen catalog redirected; redirects are not followed',+ );+ return discard();+ }+ if (!resp.ok) {+ console.warn('[CCTV] Vegvesen camera download failed:', resp.status);+ return discard();+ }+ const payload = await readResponseJsonCapped(+ resp,+ VEGVESEN_MAX_CATALOG_BYTES,+ );+ const features = Array.isArray(payload?.features) ? payload.features : [];+ const cameras = [];+ const seen = new Set();+ for (const feature of features) {+ const camera = vegvesenCameraToSource(feature);+ if (!camera || seen.has(camera.id)) continue;+ seen.add(camera.id);+ cameras.push(camera);+ }+ const maxRaw = Number(+ process.env.CCTV_VEGVESEN_MAX_SOURCES || DEFAULT_VEGVESEN_MAX_SOURCES,+ );+ const maxCount = Number.isFinite(maxRaw)+ ? Math.max(8, Math.min(1000, Math.floor(maxRaw)))+ : DEFAULT_VEGVESEN_MAX_SOURCES;+ const prioritized = prioritizeSources(cameras, maxCount, NORWAY_ANCHORS);+ console.log(+ `[CCTV] Loaded Vegvesen camera sources: ${cameras.length} (using nearest ${prioritized.length})`,+ );+ return prioritized;+ } catch (error) {+ console.warn(+ '[CCTV] Vegvesen camera download error:',+ error?.message || error,+ );+ return [];+ }+ }diff --cc src/data/dataCredits.jsindex 66fb4b271,2967f0a2b..59d7dae13--- a/src/data/dataCredits.js+++ b/src/data/dataCredits.js@@@ -240,15 -240,13 +240,22 @@@ export const DATA_CREDITS ='Traffic cameras (Calgary): contains information licensed under the ' +'<a href="https://data.calgary.ca/stories/s/Open-Calgary-Terms-of-Use/u45n-7awa" target="_blank" rel="noopener">Open Government Licence – City of Calgary</a>',},+ {+ key: 'kingcounty-cctv',+ html:+ 'CCTV cameras & frames (King County, WA): King County Road Services — ' ++ '<a href="https://kingcounty.gov/en/dept/local-services/roads" target="_blank" rel="noopener">kingcounty.gov</a>, ' ++ 'per the ' ++ '<a href="https://kingcounty.gov/en/dept/kcit/data-information-services/gis-center/about/terms-conditions-copyrights" target="_blank" rel="noopener">KCGIS Center terms</a>. ' ++ 'A few cameras are supplied by partner cities (Redmond, Sammamish, Newcastle, Snoqualmie); each names its owner in the CCTV panel.',+ },+ {+ key: 'vegvesen-cctv',+ html:+ 'Road cameras (Norway): contains data under the ' ++ '<a href="https://data.norge.no/nlod/en/2.0" target="_blank" rel="noopener">Norwegian licence for Open Government data (NLOD)</a> ' ++ 'distributed by Statens vegvesen',+ },{key: 'gbfs',html: 'Bikeshare availability: GBFS operator feeds (e.g. Austin BCycle)',