Skip to main content

Module tile_fetcher

Module tile_fetcher 

Source

Structs§

ArchiveBackend
Where a PMTiles archive is read from: HTTP range requests (with our reqwest 0.12 client, avoiding the reqwest 0.13 pulled in by pmtiles’ http-async feature), or a local file (file:// URL or a path).
TileCoord
TileUrls
A source’s tile URL templates (MapLibre’s tiles) and scheme.

Enums§

TileSource

Functions§

build_tile_coords
Compute all tile coordinates that cover a given EPSG:3857 bbox at zoom.
build_tile_urls
Build the URL list for a given tile source and set of coordinates; pixel_ratio fills {ratio}.
expand_url
tile_url for one scheme: "xyz" template at pixel ratio 1.
fetch_all_tiles
Fetch all tiles concurrently, respecting timeout and concurrency limits.
local_path
The file a file:// URL or a path names.
tile_url
The URL of a tile from a source’s templates, as MapLibre’s CanonicalTileID.url(): the template is picked by (x + y) % n (spreading tiles over subdomains), then {prefix}, {z}, {x}, {y} (flipped for scheme: "tms"), {ratio} (@2x above pixel ratio 1), {quadkey} and {bbox-epsg-3857} (for WMS) are replaced. WMTS’s {TileMatrix}, {TileCol} and {TileRow} work too (an extension: MapLibre has none).

Type Aliases§

TileData