Constructors
constructor
- new S2PMTilesReader(path, rangeRequests?, maxSize?): S2PMTilesReader
Parameters
- path: string | Reader
- rangeRequests: boolean = false
- maxSize: number = 20
Properties
Methods
getHeader
- getHeader(): Promise<Header>
Returns Promise<Header>
- the header of the archive
getMetadata
- getMetadata(): Promise<Metadata>
Returns Promise<Metadata>
- the metadata of the archive
getTile
- getTile(zoom, x, y): Promise<undefined | Uint8Array>
Parameters
- zoom: number
- x: number
- y: number
Returns Promise<undefined | Uint8Array>
- the bytes of the tile at the given (z, x, y) coordinates, or undefined if the tile does not exist in the archive.
getTileS2
- getTileS2(face, zoom, x, y): Promise<undefined | Uint8Array>
Parameters
- face: Face
- zoom: number
- x: number
- y: number
Returns Promise<undefined | Uint8Array>
- the bytes of the tile at the given (face, zoom, x, y) coordinates, or undefined if the tile does not exist in the archive.
The File reader is to be used by bun/node/deno on the local filesystem.