mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
fix binding this in ProtocolCache; update maplibre examples
This commit is contained in:
@@ -451,7 +451,7 @@ export class ProtocolCache {
|
||||
return this.tiles.get(url);
|
||||
}
|
||||
|
||||
protocol(params: any, callback: any) {
|
||||
protocol = (params: any, callback: any) => {
|
||||
const re = new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/);
|
||||
const result = params.url.match(re);
|
||||
const pmtiles_url = result[1];
|
||||
@@ -495,5 +495,5 @@ export class ProtocolCache {
|
||||
cancel();
|
||||
},
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user