mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 02:41:09 +00:00
949 B
949 B
2.0.0
- Major version bump, changing the JS API.
- Support for PMTiles spec version 3 archives.
- Backwards compatibility with v2 archives.
- Leaflet and MapLibre adapters support tile cancellation, improving performance significantly.
- ETag and Retry support for archives that are updated in-place.
- Cache-Control and Expires header support for MapLibre.
Clearer API names:
const p = new pmtiles.PMTiles('example.pmtiles')
pmtiles.leafletRasterLayer(p).addTo(map)
let protocol = new pmtiles.Protocol();
maplibregl.addProtocol("pmtiles",protocol.tile);
1.0.0
- Breaking change, introducing new TypeScript module with more clearly defined interfaces.
- Leaflet plugin API changed:
const p = new pmtiles.PMTiles('example.pmtiles')
pmtiles.leafletLayer(p).addTo(map)
- MapLibre protocol API changed:
let cache = new pmtiles.ProtocolCache();
maplibregl.addProtocol("pmtiles",cache.protocol);