diff --git a/pipeline/fetch_mvum.py b/pipeline/fetch_mvum.py index afc75c7..016ebed 100644 --- a/pipeline/fetch_mvum.py +++ b/pipeline/fetch_mvum.py @@ -30,31 +30,6 @@ PAGE_SIZE = 1000 DATA_DIR = Path(__file__).resolve().parent.parent / "data" -# Attribute fields we keep. Includes display fields, the per-vehicle-class yes/no -# permission flags, and their seasonal `*_datesopen` companions. -OUT_FIELDS = ",".join( - [ - # identity / display - "name", "id", "forestname", "districtname", - "surfacetype", "operationalmaintlevel", "symbol", "mvum_symbol_name", - "seasonal", "gis_miles", - # vehicle-class permissions - "passengervehicle", "highclearancevehicle", "truck", "bus", "motorhome", - "fourwd_gt50inches", "twowd_gt50inches", - "tracked_ohv_gt50inches", "other_ohv_gt50inches", - "atv", "motorcycle", "otherwheeled_ohv", - "tracked_ohv_lt50inches", "other_ohv_lt50inches", - "e_bike_class1", "e_bike_class2", "e_bike_class3", - # seasonal date windows - "passengervehicle_datesopen", "highclearancevehicle_datesopen", - "truck_datesopen", "bus_datesopen", "motorhome_datesopen", - "fourwd_gt50_datesopen", "twowd_gt50_datesopen", - "tracked_ohv_gt50_datesopen", "other_ohv_gt50_datesopen", - "atv_datesopen", "motorcycle_datesopen", "otherwheeled_ohv_datesopen", - "tracked_ohv_lt50_datesopen", "other_ohv_lt50_datesopen", - ] -) - def _query_page(client: httpx.Client, layer: int, where: str, offset: int) -> dict: """One page of a layer query as GeoJSON, with transfer-limit info.""" diff --git a/web/index.html b/web/index.html index 8ab77d8..0aa9869 100644 --- a/web/index.html +++ b/web/index.html @@ -11,10 +11,9 @@ content="Statewide California National Forest Motor Vehicle Use Map (MVUM): roads and trails open to motor vehicles by class and season, with live wildfire, smoke, and snow overlays." /> - + - + - + + + +
@@ -81,6 +86,7 @@

California MVUM

+

diff --git a/web/public/social.png b/web/public/social.png new file mode 100644 index 0000000..66a205e Binary files /dev/null and b/web/public/social.png differ diff --git a/web/src/main.ts b/web/src/main.ts index b2e5765..8e5f672 100644 --- a/web/src/main.ts +++ b/web/src/main.ts @@ -46,8 +46,8 @@ const style: maplibregl.StyleSpecification = { tiles: ["https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{z}/{y}/{x}"], attribution: "USGS The National Map", }, - // The "routes" vector source is added in map.on("load") once the in-memory - // PMTiles archive (archiveReady) is registered with the protocol — see above. + // The "routes" vector source is added in map.on("load"); PMTiles fetches + // tiles lazily over HTTP range requests — see the protocol setup above. }, layers: [ { @@ -92,6 +92,7 @@ const snowToggle = $("layer-snow") as HTMLInputElement; const fireStatus = $("fire-status") as HTMLParagraphElement; const smokeStatus = $("smoke-status") as HTMLParagraphElement; const aqiStatus = $("aqi-status") as HTMLParagraphElement; +const snowStatus = $("snow-status") as HTMLParagraphElement; // Grouped selector: Street-legal (plated) vs Off-road only (green/red sticker). const groups = new Map(); @@ -176,9 +177,12 @@ async function toggleAqi(on: boolean): Promise { try { const worst = await refreshAqi(map); const cat = AQI_CATEGORIES.find((c) => c.code === worst); - aqiStatus.textContent = worst <= 1 - ? "Air quality: Good across California right now" - : `Air quality reaches “${cat?.label ?? "elevated"}” somewhere in California today`; + aqiStatus.textContent = + worst === 0 + ? "No AirNow air-quality data for California right now" + : worst === 1 + ? "Air quality: Good across California right now" + : `Air quality reaches “${cat?.label ?? "elevated"}” somewhere in California today`; } catch (e) { aqiStatus.textContent = "Couldn't load air quality — try again later"; console.error(e); @@ -188,7 +192,12 @@ async function toggleAqi(on: boolean): Promise { fireToggle.addEventListener("change", () => void toggleFire(fireToggle.checked)); smokeToggle.addEventListener("change", () => void toggleSmoke(smokeToggle.checked)); aqiToggle.addEventListener("change", () => void toggleAqi(aqiToggle.checked)); -snowToggle.addEventListener("change", () => setSnowVisible(map, snowToggle.checked)); +snowToggle.addEventListener("change", () => { + setSnowVisible(map, snowToggle.checked); + snowStatus.textContent = snowToggle.checked + ? "Showing modeled snow depth (NOHRSC) — darker = deeper; verify locally" + : ""; +}); vehicleSel.addEventListener("change", applyFilters); dateInput.addEventListener("change", applyFilters); hideClosed.addEventListener("change", applyFilters);