Vector tile rendering and labeling for Leaflet.
This project is a complete vector tile renderer - including quality label layout - in as simple as possible of an implementation. It’s an alternative to renderers like MapLibre GL JS in a fraction of the size.
New projects starting from scratch should probably use MapLibre GL, but this library is useful as a drop-in replacement for raster basemaps in Leaflet, either using the Protomaps API or PMTiles on your own storage.
See the docs on what protomaps-leaflet is, what protomaps-leaflet is not
<script src="https://unpkg.com/protomaps-leaflet@4.0.1/dist/protomaps-leaflet.js"></script>
<script>
const map = L.map('map')
var layer = protomapsL.leafletLayer({url:'FILE.pmtiles OR ENDPOINT/{z}/{x}/{y}.mvt',theme:"light"})
layer.addTo(map)
</script>