/**
 * GeoTileRenderer — fetches, caches, and renders raster map tiles on a canvas.
 *
 * Inlines slippy-tile math from `d3-tile` (the v1 module is ~30 lines
 * of math; the dependency wasn't earning its weight). The math is
 * Web Mercator standard: each zoom level z has 2^z × 2^z 256-px tiles
 * tiling the world; given a projection scale (in d3 units, where
 * scale=256 puts the world in 256 px) and a translate offset, we
 * compute the tile coordinates that cover the visible viewport and
 * the (translate, scale) transform that maps tile coords to canvas px.
 *
 * Tiles are always in Web Mercator projection. A dev warning is
 * emitted if tiles are used with a non-Mercator projection.
 */
import type { GeoProjection } from "d3-geo";
export type TileURLTemplate = string | ((z: number, x: number, y: number, dpr: number) => string);
interface CachedTile {
    img: HTMLImageElement;
    loaded: boolean;
    key: string;
    lastUsed: number;
}
export declare class TileCache {
    private cache;
    private limit;
    constructor(limit?: number);
    get(key: string): CachedTile | undefined;
    set(key: string, entry: CachedTile): void;
    private evict;
    clear(): void;
}
export interface TileRenderOptions {
    tileURL: TileURLTemplate;
    projection: GeoProjection;
    width: number;
    height: number;
    tileCache: TileCache;
    onTileLoad?: () => void;
}
/**
 * Render visible tiles onto a canvas context.
 * Returns true if all visible tiles are loaded (no pending fetches).
 */
export declare function renderTiles(ctx: CanvasRenderingContext2D, options: TileRenderOptions): boolean;
export {};
