Class PMTiles

Main class encapsulating PMTiles decoding logic.

if source is a string, creates a FetchSource using that string as the URL to a remote PMTiles. if no cache is passed, use a SharedPromiseCache. if no decompress is passed, default to the browser DecompressionStream API with a fallback to fflate.

Constructors

Properties

cache: Cache
decompress: DecompressFunc
source: Source

Methods

  • Return the header of the archive, including information such as tile type, min/max zoom, bounds, and summary statistics.

    Returns Promise<Header>

  • Return the arbitrary JSON metadata of the archive.

    Returns Promise<unknown>

  • Primary method to get a single tile bytes from an archive.

    Returns undefined if the tile does not exist in the archive.

    Parameters

    • z: number
    • x: number
    • y: number
    • Optional signal: AbortSignal

    Returns Promise<undefined | RangeResponse>

Generated using TypeDoc