feat: enable PMTiles protocol support (#16629)

This patch enables PMTiles protocol for MapLibre-GL. Protocol allows to fetch tiles from a single file.  This drastically simplifies the process to self-host own tiles.
This commit is contained in:
Savely Krasovsky 2025-03-06 11:50:14 +01:00 committed by GitHub
parent c110c9b00e
commit 69b5365965
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 25 additions and 8 deletions

View file

@ -1,4 +1,8 @@
<script lang="ts" module>
import { Protocol } from 'pmtiles';
let protocol = new Protocol();
void maplibregl.addProtocol('pmtiles', protocol.tile);
void maplibregl.setRTLTextPlugin(mapboxRtlUrl, true);
</script>