diff --git a/types/leaflet/index.d.ts b/types/leaflet/index.d.ts index 06ebbe9df2..f37400a65b 100644 --- a/types/leaflet/index.d.ts +++ b/types/leaflet/index.d.ts @@ -806,6 +806,7 @@ export interface TileLayerOptions extends GridLayerOptions { export class TileLayer extends GridLayer { constructor(urlTemplate: string, options?: TileLayerOptions); setUrl(url: string, noRedraw?: boolean): this; + getTileUrl(coords: L.Coords): string; protected _abortLoading(): void; protected _getZoomForUrl(): number; diff --git a/types/leaflet/leaflet-tests.ts b/types/leaflet/leaflet-tests.ts index 8a7a4cf9b6..5630ac49d8 100644 --- a/types/leaflet/leaflet-tests.ts +++ b/types/leaflet/leaflet-tests.ts @@ -728,6 +728,11 @@ export class ExtendedTileLayer extends L.TileLayer { newCoords.z = coords.z; return super.createTile(newCoords, done); } + + getTileUrl(coords: L.Coords) { + return super.getTileUrl(coords); + } + _abortLoading() { // adapted from TileLayer's implementation for (const i in this._tiles) {