import { DataSource, TileDataSource, TileDataSourceOptions } from '.'; import { DefaultLatLonKeys, MapBounds } from '../core'; export interface TileDownloadListener { onDownloadCompleted(); onDownloadFailed(tile: { x: number; y: number; tileId: number }); onDownloadProgress(progress: number); onDownloadStarting(tileCount: number); } export interface PersistentCacheTileDataSourceOptions extends TileDataSourceOptions { dataSource: TileDataSource; databasePath?: string; capacity?: number; cacheOnlyMode?: boolean; } export class PersistentCacheTileDataSource extends TileDataSource { capacity: number; cacheOnlyMode: boolean; clear(); startDownloadArea(mapBounds: MapBounds, minZoom: number, maxZoom: number, tileDownloadListener: TileDownloadListener); stopAllDownloads(); } export interface MemoryCacheTileDataSourceOptions extends TileDataSourceOptions { dataSource: TileDataSource; capacity?: number; } export class MemoryCacheTileDataSource extends DataSource {}