Park Tiles look as the only base map theme: the old ONLINE_STYLE_PATCH palette and the theme switch are gone, the legend at /symbols.html shows the one look, and the docs carry the sampled Park Tiles colors
This commit is contained in:
1 parent
07b623b7ca
commit
59a29e86a5
8 files changed
+76
-227
No files matched your search
+24
-29
@@ -66,9 +66,9 @@ approximate the online look — two independently-maintained palettes
|
||||
that drifted out of sync (building opacity, road casings, park
|
||||
boundaries) every time one side changed. Planetiler's default profile
|
||||
*is* OpenMapTiles, so `offlineStyle()` now just clones the same parsed
|
||||
Liberty JSON `ONLINE_STYLE` already fetched, repoints its `sources`,
|
||||
Liberty JSON `ONLINE_STYLE_TEMPLATE` already fetched, repoints its `sources`,
|
||||
`glyphs`, and `sprite` at local copies, and applies the exact same
|
||||
`ONLINE_STYLE_PATCH` recolor (below) — one palette, one place to tune
|
||||
`patchOnlineStyle` recolor (below) — one palette, one place to tune
|
||||
it, correct on both sides by construction rather than by re-checking
|
||||
every time something changes.
|
||||
|
||||
@@ -111,22 +111,25 @@ snapshot under `public/vendor/liberty-sprite/` — both `offlineStyle()`
|
||||
and the online style otherwise share identical `glyphs`/`sprite`
|
||||
roles, just resolved to local vs. `tiles.openfreemap.org` URLs.
|
||||
|
||||
`public/js/map_themes.js`'s `ONLINE_STYLE_PATCH` — applied to whichever
|
||||
source is loaded, online or offline (see above) — nudges Liberty's
|
||||
OpenMapTiles layer ids towards a warm, National Park Service
|
||||
"Park Tiles"-inspired 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,
|
||||
brown road casings) rather than sourced. This is deliberately
|
||||
partial — labels, halos, rail, and minor overlays (cemetery/hospital/
|
||||
school/pitch/track shading) are left at Liberty's own defaults.
|
||||
`public/js/map_themes.js`'s `patchOnlineStyle` — applied to whichever
|
||||
source is loaded, online or offline (see above) — recolors Liberty's
|
||||
OpenMapTiles layer ids after the National Park Service's Park Tiles
|
||||
"Standard" style (`PARK_TILES_PATCH`). Colors are sampled from the Park
|
||||
Tiles legend swatches (`nps.gov/maps/web/img/legend/*-standard.png`)
|
||||
plus the public "Imagery" style JSON
|
||||
(`nps.gov/lib/npmap.js/style/ck72fwp2642dv07o7tbqinvz4.json`, 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) — see
|
||||
`docs/nps-resources.adoc` for the values. The park fill is moved above
|
||||
landcover, so a whole park reads as one flat sage like theirs, with a
|
||||
light-green tint band inside its boundary line; Natural Earth's
|
||||
low-zoom color relief is hidden. Line widths stay Liberty's own.
|
||||
`/symbols.html` draws its map legend from the same patched style.
|
||||
(An earlier, looser "Park Tiles-inspired" palette, `ONLINE_STYLE_PATCH`,
|
||||
was replaced by this one — it used Park Tiles' park *point* green
|
||||
`#b3e378` as the area fill.)
|
||||
+
|
||||
Recreating the *color choices* is fine — that's not the kind of thing
|
||||
a data license restricts — but the actual Park Tiles *service* stays
|
||||
@@ -137,19 +140,11 @@ labeling prioritized), not general-purpose worldwide cartography —
|
||||
irrelevant to this app either way now, since it never talks to NPS's
|
||||
tile service, only ever OpenFreeMap/Geofabrik.
|
||||
|
||||
A second theme, *NPS Park Tiles* (Base map panel → Theme, remembered in
|
||||
`localStorage`), is a closer take on Park Tiles' Standard style:
|
||||
`PARK_TILES_PATCH` in the same file, colors sampled from the Park Tiles
|
||||
legend swatches (see `docs/nps-resources.adoc`), and the park fill moved
|
||||
above landcover with a tint band inside its boundary line. Both themes
|
||||
live in `public/js/map_themes.js` so `/symbols.html` can draw its map
|
||||
legend from the very same patched style the map uses.
|
||||
|
||||
`loadOnlineStyle` (`public/js/map.js`) fetches Liberty's live
|
||||
`style.json` once and keeps it unpatched as `ONLINE_STYLE_TEMPLATE`;
|
||||
`onlineStyle(theme)` patches a fresh copy for whichever theme is
|
||||
selected — MapLibre accepts a style object anywhere it accepts a style
|
||||
URL, so `applyStyle`'s `map.setStyle` takes either.
|
||||
`onlineStyle()` patches a fresh copy for each `setStyle` — MapLibre
|
||||
accepts a style object anywhere it accepts a style URL, so `applyStyle`'s
|
||||
`map.setStyle` takes either.
|
||||
That fetch runs before the map (and the rest of the page) is
|
||||
constructed — a top-level `await` — so there's no flash of Liberty's
|
||||
own colors before the patch lands; a 3s timeout and a catch-all fall
|
||||
|
||||
+15
-9
@@ -27,7 +27,7 @@ checking here before searching from zero next time.
|
||||
public domain as a US government work
|
||||
|
||||
| Park Tiles color palette (shared offline + online basemap theme)
|
||||
| `public/js/map_themes.js`'s `ONLINE_STYLE_PATCH`
|
||||
| `public/js/map_themes.js`'s `PARK_TILES_PATCH`
|
||||
| Colors only — see <<park-tiles>> for why the actual tile service isn't used
|
||||
|
||||
| `overview` (top-right minimap/inset control)
|
||||
@@ -187,8 +187,15 @@ why this app uses OpenFreeMap Liberty as its actual basemap, not Park
|
||||
Tiles — see `docs/architecture.adoc`'s "Offline maps" section.
|
||||
|
||||
Recreating the *color choices* is a different matter — not the kind of
|
||||
thing a data license restricts — and is what `ONLINE_STYLE_PATCH` in
|
||||
`public/js/map.js` actually does (see `docs/architecture.adoc`).
|
||||
thing a data license restricts — and is what `PARK_TILES_PATCH` in
|
||||
`public/js/map_themes.js` actually does (see `docs/architecture.adoc`).
|
||||
Its colors come from the Standard style's legend swatches
|
||||
(`nps.gov/maps/web/img/legend/*-standard.png`, small rendered map
|
||||
crops — sampled pixel by pixel): land `#F7EEE8`, NPS unit area a flat
|
||||
sage `#CED2B7`, boundary `#779238`/`#8BA35A` with a `#B2C294` tint band,
|
||||
water `#B5D0DE`, primary road `#F8ECBE` cased `#8F867A`, secondary
|
||||
`#F9F9F6`, local `#F5F3E5`, trails dashed `#8E827B`, buildings
|
||||
`#E7E4D5`/`#C1A88B`.
|
||||
|
||||
=== Public style JSON (source for the real colors we did pull)
|
||||
|
||||
@@ -218,12 +225,11 @@ embedded credentials, even when technically reachable:
|
||||
| `ck5cpia2u0auf01p9vbugvcpv`
|
||||
|===
|
||||
|
||||
Colors actually pulled from the Imagery style JSON and used in
|
||||
`ONLINE_STYLE_PATCH`: background (`hsl(40, 37%, 97%)`, a warm cream), the
|
||||
park/protected-area green (`#b3e378`), the two road-importance tiers
|
||||
(`#fdefbe`/`#fef7dd`), and the park-boundary line color (`#546619`, dark
|
||||
olive). The rest of `ONLINE_STYLE_PATCH` extends that same warm/olive
|
||||
family by eye rather than from a sourced value.
|
||||
The Imagery style sits over satellite imagery, so it has no landcover
|
||||
fills and white labels — useful for road/trail/boundary colors and label
|
||||
hierarchy, not for the land itself; those came from the legend swatches
|
||||
above. (Its `#b3e378` is the park *point* color, which an earlier palette
|
||||
mistakenly used as the park area fill.)
|
||||
|
||||
=== Legend / cartographic hierarchy
|
||||
|
||||
|
||||
Reference in new issue
Block a user