A toolset to visualise PMTiles more easily in Leaflet.js (based on https://github.com/protomaps/protomaps-leaflet).
Demos:
To build distribution files locally run:
npm run dist
See 📂 demo folder for examples.
To run the demos locally:
- launch
npm run dev
to build and copy distribution files into the dist/demo folder on any change, - launch
npm run demo
in another terminal to serve and update the demo files on any change, - serve your PMTiles with
http-server -p 8081 --cors
and adjust the URL as required in demo files, - open eg http://127.0.0.1:8080/openmaptiles.html in your browser
The module exposes a mapbox_style
function generating paint and labels rules from a Mapbox style is a JSON document . This is typically useful to render PMTiles created from the OpenMapTiles profile.