improve metadata view [#49]

This commit is contained in:
Brandon Liu
2022-12-02 01:51:51 +08:00
parent 94e5bc7154
commit 7b65314ca9
3 changed files with 70 additions and 92 deletions

View File

@@ -799,21 +799,6 @@ export class PMTiles {
}
}
async root_entries() {
const header = await this.cache.getHeader(this.source);
// V2 COMPATIBILITY
if (header.specVersion < 3) {
return [];
}
return await this.cache.getDirectory(
this.source,
header.rootDirectoryOffset,
header.rootDirectoryLength,
header
);
}
async getHeader() {
return await this.cache.getHeader(this.source);
}