js decoder 1.1.0

adds fflate dependency; maplibre decoder can read gzipped tiles [#41]
This commit is contained in:
Brandon Liu
2022-07-07 12:36:16 +08:00
parent abf1dd9372
commit 3811ff9b1b
5 changed files with 31 additions and 9 deletions

View File

@@ -93,6 +93,7 @@ function MaplibreMap(props: { file: PMTiles }) {
useEffect(() => {
let cache = new ProtocolCache();
maplibregl.addProtocol("pmtiles", cache.protocol);
cache.add(props.file); // this is necessary for non-HTTP sources
map = new maplibregl.Map({
container: mapContainerRef.current!,