---
title: "TilePreloadProgressCallback | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Type Alias TilePreloadProgressCallback

TilePreloadProgressCallback: (  
    done: number,  
    total: number,  
    tileID?: string | null,  
) \=> void

Called after each tile fetch attempt during preloading.

#### Type Declaration

-   -   (done: number, total: number, tileID?: string | null): void
    -   #### Parameters
        
        -   done: number
            
            Number of tiles attempted so far (loaded or failed)
            
        -   total: number
            
            Total number of tiles to preload
            
        -   `Optional`tileID: string | null
            
            ID of the tile just attempted, in `"z/x/y"` format
            
        
        #### Returns void
        

#### Remarks[](#remarks)

**API Key Usage**: Each tile fetch counts against your MapTiler Cloud API key quota.
