Skip to content

kalisio/protomaps-leaflet

This branch is 2 commits ahead of, 12 commits behind protomaps/protomaps-leaflet:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

92a2d4c · Jul 15, 2024
Jan 28, 2024
May 9, 2024
May 9, 2024
Jul 15, 2024
May 9, 2024
Oct 7, 2021
May 9, 2024
Jan 23, 2024
Feb 25, 2024
Jan 24, 2024
Feb 19, 2024
May 9, 2024
May 9, 2024
Apr 3, 2022

Repository files navigation

protomaps-leaflet

Vector tile rendering and labeling for Leaflet.

npm Test suite

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.

Features

  • Render interactive slippy maps with Leaflet integration
  • Supports variable web fonts with multiple weights and italics in a single font file
  • Can read normal Z/X/Y tile URLs or offline, static-hosted tile archives in PMTiles format
  • Full out-of-the-box support for right-to-left and Indic/Brahmic writing systems
  • Configurable via plain JavaScript
  • (Advanced) Extensible API for defining your own symbolizers

See the docs on what protomaps-leaflet is, what protomaps-leaflet is not

Demos

How to use

<script src="https://unpkg.com/protomaps-leaflet@latest/dist/protomaps-leaflet.min.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>

See Also

About

Lightweight vector map rendering + labeling and symbology for Leaflet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 91.5%
  • JavaScript 5.5%
  • HTML 3.0%