diff --git a/docs/architecture.adoc b/docs/architecture.adoc index e6a4d26..ca04485 100644 --- a/docs/architecture.adoc +++ b/docs/architecture.adoc @@ -89,17 +89,33 @@ covering accented Latin place names (Slovak, Czech, Polish, German, ...). Labels in other scripts (Cyrillic, Greek, CJK, ...) won't render offline, since those glyph ranges aren't vendored. -`public/js/map.js`'s `OFFLINE_THEME` also nudges a handful of color -roles (background, water, wood, buildings, the two road-importance -tiers) from `protomaps-themes-base`'s stock "light" theme towards the -online "liberty" style's actual palette (sampled from its style JSON), -so Online/Offline don't look like two different apps. This is -deliberately partial — most roles (labels, casings, minor terrain -fills, ...) are left at their theme defaults — not the kind of -full per-layer recolor a previous iteration of this app did (and -removed, along with any dependency on OsmAnd's own tile server, which -this app cannot use per OsmAnd's terms restricting tile use to "personal, -non-commercial use within OsmAnd applications and platforms"). +`public/js/map.js`'s `OFFLINE_THEME` nudges a couple dozen color roles +from `protomaps-themes-base`'s stock "light" theme towards the +National Park Service's own "Park Tiles" cartography — a warm, +Harpers-Ferry-Center-derived look. A few of these values are the +genuine paint colors pulled from a public Park Tiles style JSON +(`nps.gov/lib/npmap.js/style/ck72fwp2642dv07o7tbqinvz4.json`, the +"Imagery" variant — the only one of NPS's four styles served from a +plain, unauthenticated URL; "Standard"/"Slate"/"Light" resolve through +Mapbox Studio's private API with an access token, which isn't +something to piggyback on even though it's technically visible in +their own JS bundle) — background, the park/protected-area green, the +two road-importance tiers, and the park-boundary line color. The rest +are reasoned to match that same warm family (olive greens, muted blue) +rather than sourced. This is deliberately partial — labels, casings, +and roles with no clean real-color anchor are left at theme +defaults — not the kind of full per-layer recolor a previous iteration +of this app did (and removed, along with any dependency on OsmAnd's +own tile server, which this app cannot use per OsmAnd's terms +restricting tile use to "personal, non-commercial use within OsmAnd +applications and platforms"). ++ +Recreating the *color choices* is fine — that's not the kind of thing +a data license restricts — but the actual Park Tiles *service* stays +off-limits: its OSM/terrain layers are licensed through Mapbox Atlas +(a commercial, non-sublicensable data service scoped to NPS), and it's +built for park visitors specifically (park-unit and trailhead +labeling prioritized), not general-purpose worldwide cartography. No PMTiles file ships with the repository — it is expected to be supplied locally (see `docs/development.adoc`) and stays gitignored diff --git a/public/js/map.js b/public/js/map.js index b44bc6f..33990dd 100644 --- a/public/js/map.js +++ b/public/js/map.js @@ -20,23 +20,46 @@ const ONLINE_STYLE = "https://tiles.openfreemap.org/styles/liberty"; const protocol = new pmtiles.Protocol(); addProtocol("pmtiles", protocol.tile); -// A few color roles nudged from protomaps-themes-base's stock "light" theme -// towards the online OpenFreeMap "liberty" style's actual palette (sampled -// from its style JSON — see docs/architecture.adoc), so switching between -// Online/Offline doesn't look like two different apps. Not a full recolor: -// most roles (labels, casings, minor terrain fills, ...) are left at their -// theme defaults. +// Nudged from protomaps-themes-base's stock "light" theme towards the +// National Park Service's own "Park Tiles" cartography — a warm, +// Harpers-Ferry-Center-derived look. Not their actual map: a handful of +// values below (marked) are the genuine paint colors pulled from a public +// Park Tiles style JSON +// (nps.gov/lib/npmap.js/style/ck72fwp2642dv07o7tbqinvz4.json, the "Imagery" +// variant — the only one of their four styles served from a plain, +// unauthenticated URL; "Standard"/"Slate"/"Light" resolve through Mapbox +// Studio's private API with an access token, which isn't something to +// piggyback on even though it's technically visible in their own JS bundle). +// The rest are reasoned to match that same family (warm cream ground, olive +// greens, muted blue) rather than sourced. Not a full recolor: labels, +// casings, and roles with no clean real-color anchor are left at theme +// defaults. +// +// Recreating the color choices is legitimate — that's not the kind of thing +// a data license restricts (see docs/architecture.adoc's "Offline maps" +// section) — what stays off-limits is their actual tile *service*: its +// OSM/terrain layers are licensed through Mapbox Atlas, a commercial, +// non-sublicensable data service scoped to NPS. const OFFLINE_THEME = { ...protomaps_themes_base.namedTheme("light"), - background: "#f8f4f0", - earth: "#f8f4f0", - water: "#9ebdff", - wood_a: "#ace38c", - wood_b: "#ace38c", - buildings: "#dcd9d6", - highway: "#f2934a", - major: "#ffeeaa", - link: "#ffeeaa", + background: "#f9f6ef", // real: Park Tiles' own background, hsl(40, 37%, 97%) + earth: "#f9f6ef", + water: "#a3cedf", + wood_a: "#c3d9a0", + wood_b: "#b3c98f", + scrub_a: "#d6e3b8", + scrub_b: "#cddba8", + park_a: "#c8e2a0", + park_b: "#b3e378", // real: Park Tiles' protected-area/park-point green + sand: "#f0e4c4", + beach: "#f0e4c4", + buildings: "#ded7cc", + pedestrian: "#e9e2d8", + highway: "#fdefbe", // real: Park Tiles' primary/highway road color + major: "#fef7dd", // real: Park Tiles' secondary road color + minor: "#fffdf8", + link: "#fef7dd", + boundaries: "#546619", // real: Park Tiles' park-boundary line color }; function offlineStyle() {