Skip to content

A toolset to visualise PMTiles more easily in Leaflet.js

License

Notifications You must be signed in to change notification settings

kalisio/leaflet-pmtiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leaflet-pmtiles

A toolset to visualise PMTiles more easily in Leaflet.js (based on https://github.com/protomaps/protomaps-leaflet).

Demos:

Build

To build distribution files locally run:

npm run dist

Getting started

See 📂 demo folder for examples.

To run the demos locally:

  1. launch npm run dev to build and copy distribution files into the dist/demo folder on any change,
  2. launch npm run demo in another terminal to serve and update the demo files on any change,
  3. serve your PMTiles with http-server -p 8081 --cors and adjust the URL as required in demo files,
  4. open eg http://127.0.0.1:8080/openmaptiles.html in your browser

Features

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.

Image

About

A toolset to visualise PMTiles more easily in Leaflet.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published