js v2.0.0: rename protocol.tileFunc -> tile, CHANGELOG, README

This commit is contained in:
Brandon Liu
2022-10-13 09:59:56 +08:00
parent bdc01d5a4e
commit cf20dcd0ce
4 changed files with 26 additions and 5 deletions

View File

@@ -61,7 +61,7 @@ export class Protocol {
return this.tiles.get(url);
}
tileFunc = (params: any, callback: any) => {
tile = (params: any, callback: any) => {
const re = new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/);
const result = params.url.match(re);
const pmtiles_url = result[1];