import { LayerGroup } from "../layer-group.js"; import { type GeoJSONFeature, type GeoJSONOptions } from "./geojson.js"; import type { LatLngBoundsLike } from "../geo.js"; import type { Orihon } from "../map.js"; import { type PathOptions } from "./vector.js"; export interface VectorTileCoordinates { x: number; y: number; z: number; bounds: LatLngBoundsLike; signal: AbortSignal; } export type VectorTileProvider = (coordinates: VectorTileCoordinates) => Promise | GeoJSONFeature[] | null | undefined; export interface MVTPaintRule extends PathOptions { layer: string; type: "fill" | "line" | "circle"; minZoom?: number; maxZoom?: number; radius?: number; filter?: (feature: GeoJSONFeature) => boolean; } export interface VectorTileLayerOptions extends Omit { minZoom?: number; maxZoom?: number; buffer?: number; provider: VectorTileProvider; filter?: GeoJSONOptions["filter"]; style?: GeoJSONOptions["style"] | ((feature: GeoJSONFeature, tile: VectorTileCoordinates) => Record); paint?: MVTPaintRule[]; } export interface VectorTileEventMap { tileloadstart: { coordinates: VectorTileCoordinates; }; tileload: { coordinates: VectorTileCoordinates; features: GeoJSONFeature[]; }; tileabort: { coordinates: VectorTileCoordinates; }; tileerror: { coordinates: VectorTileCoordinates; error: unknown; }; } export declare class VectorTileLayer extends LayerGroup> { #private; /** Tile bookkeeping for diagnostics; the tile map itself stays private. */ getStats(): { active: number; retained: number; cached: number; loading: number; }; constructor(options: VectorTileLayerOptions); onAdd(map: Orihon): void; onRemove(): void; clearTiles(): this; render(): void; } export declare function vectorTileLayer(options: VectorTileLayerOptions): VectorTileLayer; //# sourceMappingURL=vector-tile-layer.d.ts.map