fix binding this in ProtocolCache; update maplibre examples

This commit is contained in:
Brandon Liu
2022-02-18 11:17:34 +08:00
parent 7517b26c66
commit ca1c59d9d3
3 changed files with 6 additions and 4 deletions

View File

@@ -18,7 +18,8 @@
<body>
<div id="map"></div>
<script>
pmtiles.addProtocol(maplibregl)
let cache = new pmtiles.ProtocolCache();
maplibregl.addProtocol("pmtiles",cache.protocol);
var style = {
"version": 8,
"sources": {

View File

@@ -31,7 +31,8 @@ tippecanoe -zg --projection=EPSG:4326 --no-tile-compression --no-feature-limit -
pmtiles-convert cb_2018_us_zcta510_500k_nolimit.mbtiles cb_2018_us_zcta510_500k_nolimit.pmtiles</pre>
</div>
<script>
pmtiles.addProtocol(maplibregl)
let cache = new pmtiles.ProtocolCache();
maplibregl.addProtocol("pmtiles",cache.protocol);
var style = {
"version": 8,
"sources": {