Two UMD builds, loaded lazily by src/js/lib/offline-map.js and by nothing
else. They are not in the player's vendorScripts: front matter on purpose:
most people never download an offline map, and 148 KB is not worth charging
every visitor for a feature they did not ask for.
| file | version | global | what it is |
|---|---|---|---|
pmtiles.js |
4.5.0 | pmtiles |
reads a PMTiles archive over HTTP Range requests, or out of any object with a getBytes(offset, length). Used both to reach into Protomaps' planet during a download and to read the archive back off the phone afterwards. |
protomaps-leaflet.js |
5.1.0 | protomapsL |
renders the vector tiles inside that archive into an ordinary Leaflet layer. It bundles its own copy of pmtiles; pmtiles.js is separate because we need PMTiles and zxyToTileId directly and protomaps-leaflet does not re-export them. |
Both are MIT or BSD-3 licensed. The map data they render is OpenStreetMap under ODbL, and Protomaps' basemap builds are an ODbL Produced Work, which is why an offline copy can be handed to a player at all: attribution is the whole of the obligation, and it is carried on the map.
Upgrading: npm pack protomaps-leaflet@<v> pmtiles@<v>, take dist/*.js, and
re-run scripts/test-wherigo-offline.mjs, which writes an archive with our own
encoder and reads it back with whatever version landed here.