Skip to main content

fetch_all_tiles

Function fetch_all_tiles 

Source
pub async fn fetch_all_tiles(
    client: &Client,
    urls: Vec<(TileCoord, String)>,
    source: &TileSource,
    timeout_ms: u32,
    concurrency: u32,
    fail_on_tile_error: bool,
) -> Result<Vec<(TileCoord, TileData)>, BasemapError>
Expand description

Fetch all tiles concurrently, respecting timeout and concurrency limits.

Tiles come from the in-process LRU cache, else the disk cache (crate::cache), else the network; fetched tiles are added to both.

When fail_on_tile_error is false, individual tile failures are logged and skipped; the render continues with whatever tiles succeeded.