Mapterhorn (mapterhorn.com, Protomaps-affiliated) publishes pre-built Terrarium-encoded terrain as PMTiles: a global planet.pmtiles (z0-12) plus ~450 regional chunks (z13+). Same pmtiles extract --bbox=... mechanism offline.pmtiles already uses, just against their files — confirmed live against their real manifest and the documented Interlaken example. Replaces fetching every individual tile ourselves (even after this session's earlier concurrency fix, still tens of minutes for a real region) with 1-3 extract calls plus a merge when the bbox spans more than one chunk: seconds, not minutes. Removes CONCURRENT_TILE_FETCHES, write_terrarium_mbtiles, tile_range, lng/lat_to_tile_x/y, fetch_terrarium_tile, and the sqlite3 gem entirely — none of it is needed once the tiles arrive pre-packaged. dem.js's point-elevation lookup (shadow.js's terrain-shadow overlay) hardcoded a 256px PNG tile assumption that Mapterhorn's 512px WebP tiles would have silently broken — now reads the actually-decoded tile's own size and mime type instead of assuming either.
115 lines
4.0 KiB
Plaintext
115 lines
4.0 KiB
Plaintext
= Third-party notices
|
|
:toc:
|
|
:toclevels: 1
|
|
|
|
Frontend libraries vendored under `public/vendor/` instead of loaded
|
|
from a CDN, so the app keeps working with no internet access. All are
|
|
BSD-3-Clause licensed.
|
|
|
|
[cols="1,1,2"]
|
|
|===
|
|
| Library | Version | Source
|
|
|
|
| MapLibre GL JS
|
|
| 6.6.0
|
|
| https://github.com/maplibre/maplibre-gl-js
|
|
|
|
| pmtiles (pmtiles.js)
|
|
| 4.5.0
|
|
| https://github.com/protomaps/PMTiles
|
|
|
|
| protomaps-themes-base
|
|
| 4.5.0
|
|
| https://github.com/protomaps/basemaps
|
|
|
|
| maplibre-contour (Overlays panel's "Contour lines", `public/js/contour.js`)
|
|
| 0.1.0
|
|
| https://github.com/onthegomap/maplibre-contour
|
|
|===
|
|
|
|
Also vendored under `public/vendor/`, but not BSD-3-Clause like the
|
|
above — MIT-licensed per its own `package.json` (the monorepo's
|
|
top-level `LICENSE.md` separately places the whole repo in the public
|
|
domain as a work of the US government; either way, no attribution is
|
|
required):
|
|
|
|
[cols="1,1,2"]
|
|
|===
|
|
| Library | Version | Source
|
|
|
|
| NPS Home Button (`home-button`)
|
|
| 0.0.1-d
|
|
| https://github.com/nationalparkservice/npmap5-plugins/tree/main/home-button
|
|
|
|
| NPS Overview Map (`maplibre-gl-overview`)
|
|
| 5.0.1
|
|
| https://github.com/nationalparkservice/npmap5-plugins/tree/maplibre-gl-overview
|
|
|===
|
|
|
|
The overview map is vendored from an unmerged branch, not `main` (see
|
|
`docs/nps-resources.adoc`), and converted from its UMD dist build to a
|
|
plain ES module — no functional change except the module wrapper. It
|
|
was also patched for a MapLibre API break: it reads `map.transform`
|
|
(public in the MapLibre ~2.4 this plugin targets) to relax the
|
|
overview's polar pan limit, but MapLibre 6's `Map` no longer exposes
|
|
`.transform` at all — guarded to skip that (cosmetic) adjustment
|
|
instead of throwing when it's absent.
|
|
|
|
Offline map text labels need font glyphs too (see
|
|
`docs/architecture.adoc`), vendored under `public/vendor/fonts/` —
|
|
SIL Open Font License, not BSD-3-Clause like the above:
|
|
|
|
[cols="1,2"]
|
|
|===
|
|
| Asset | Source
|
|
|
|
| Noto Sans Regular/Italic/Medium glyph PBFs (ranges `0-255`,
|
|
`256-511` only)
|
|
| https://github.com/protomaps/basemaps-assets[protomaps/basemaps-assets]
|
|
(`fonts/`, `OFL.txt` included alongside)
|
|
|
|
| National Park (Bold weight only, `.woff2`), topbar wordmark
|
|
(`.topbar__brand`, `public/css/style.css`) — see
|
|
`docs/nps-resources.adoc`
|
|
| https://nationalparktypeface.com[nationalparktypeface.com] (Ben
|
|
Hoepner, Andrea Herstowski, Jeremy Shellhorn / DO Studio) — "published
|
|
for free use under the SIL Open Font License" per the site; no
|
|
`OFL.txt` ships in its own download zips, unlike Noto Sans above
|
|
|===
|
|
|
|
The online map style (not vendored, fetched at runtime when the
|
|
"Online" layer is selected) is
|
|
https://tiles.openfreemap.org/styles/liberty[OpenFreeMap "liberty"],
|
|
built from https://www.openstreetmap.org[OpenStreetMap] data.
|
|
|
|
`terrain.pmtiles` (`lib/maptool/pmtiles_builder.rb`'s in-app
|
|
regeneration, or the manual recipe in `docs/development.adoc`) is
|
|
extracted at build time, not vendored, from
|
|
https://mapterhorn.com[Mapterhorn] — a Protomaps-affiliated project
|
|
publishing pre-built Terrarium-encoded terrain as PMTiles. Per-region
|
|
source licenses vary (CC-BY-4.0 and similar); see
|
|
https://download.mapterhorn.com/attribution.json[their own attribution
|
|
list] for the full provenance.
|
|
|
|
Not a frontend asset like the above, but also baked into this app's own
|
|
Docker image (not a separate container the way kiwix-serve/gpsd are —
|
|
see `docs/deployment.adoc`/`docs/development.adoc`): the `pmtiles` CLI
|
|
(`go-pmtiles`), installed as a static binary in the `Dockerfile` for
|
|
`lib/maptool/pmtiles_builder.rb`'s in-app offline.pmtiles/terrain.pmtiles
|
|
regeneration. BSD-3-Clause, same as pmtiles.js/MapLibre GL above.
|
|
|
|
[cols="1,1,2"]
|
|
|===
|
|
| Tool | Version | Source
|
|
|
|
| go-pmtiles (`pmtiles` CLI)
|
|
| 1.31.2
|
|
| https://github.com/protomaps/go-pmtiles
|
|
|===
|
|
|
|
To update a vendored library: download its package (e.g.
|
|
`npm pack <name>@<version>`), replace the corresponding files under
|
|
`public/vendor/<name>/`, and update the version in this file. To
|
|
update go-pmtiles, bump `PMTILES_VERSION` in the `Dockerfile` and the
|
|
version here.
|