mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
improve metadata view [#49]
This commit is contained in:
15
js/index.ts
15
js/index.ts
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user