/** * 离线地图便捷 API * 提供更友好的 API 接口和事件监听 */ import type { OfflineMapInfo, OfflineMapDownloadConfig, OfflineMapDownloadEvent, OfflineMapCompleteEvent, OfflineMapErrorEvent, OfflineMapPausedEvent, OfflineMapCancelledEvent, OfflineMapStorageInfo } from '../types/offline.types'; /** * 离线地图管理类 */ export declare class OfflineMapManager { /** * 打开高德 3D 地图 SDK 官方离线地图 UI 组件(Android)。 */ static openOfflineMapUI(): Promise; /** * 获取所有可下载的城市列表 */ static getAvailableCities(): Promise; /** * 获取所有省份列表 */ static getAvailableProvinces(): Promise; /** * 根据省份代码获取城市列表 */ static getCitiesByProvince(provinceCode: string): Promise; /** * 获取已下载的地图列表 */ static getDownloadedMaps(): Promise; /** * 开始下载离线地图 */ static startDownload(config: OfflineMapDownloadConfig): Promise; /** * 暂停下载 */ static pauseDownload(cityCode: string): Promise; /** * 恢复下载 */ static resumeDownload(cityCode: string): Promise; /** * 取消下载 */ static cancelDownload(cityCode: string): Promise; /** * 删除离线地图 */ static deleteMap(cityCode: string): Promise; /** * 更新离线地图 */ static updateMap(cityCode: string): Promise; /** * 检查是否有可用更新 */ static checkUpdate(cityCode: string): Promise; /** * 检查地图是否已下载 */ static isMapDownloaded(cityCode: string): Promise; /** * 获取地图下载状态 */ static getMapStatus(cityCode: string): Promise; /** * 获取所有下载任务的总进度 */ static getTotalProgress(): Promise; /** * 获取当前正在下载的城市列表 */ static getDownloadingCities(): Promise; /** * 获取离线地图占用的存储空间(字节) */ static getStorageSize(): Promise; /** * 获取详细的存储信息 */ static getStorageInfo(): Promise; /** * 清理所有离线地图 */ static clearAllMaps(): Promise; /** * 设置离线地图存储路径 */ static setStoragePath(path: string): void; /** * 获取离线地图存储路径 */ static getStoragePath(): Promise; /** * 批量下载地图 */ static batchDownload(cityCodes: string[], allowCellular?: boolean): Promise; /** * 批量删除地图 */ static batchDelete(cityCodes: string[]): Promise; /** * 批量更新地图 */ static batchUpdate(cityCodes: string[]): Promise; /** * 暂停所有下载任务 */ static pauseAllDownloads(): Promise; /** * 恢复所有下载任务 */ static resumeAllDownloads(): Promise; /** * 监听下载进度事件 */ static addDownloadProgressListener(listener: (event: OfflineMapDownloadEvent) => void): { remove: () => void; }; /** * 监听下载完成事件 */ static addDownloadCompleteListener(listener: (event: OfflineMapCompleteEvent) => void): { remove: () => void; }; /** * 监听下载错误事件 */ static addDownloadErrorListener(listener: (event: OfflineMapErrorEvent) => void): { remove: () => void; }; /** * 监听下载暂停事件 */ static addDownloadPausedListener(listener: (event: OfflineMapPausedEvent) => void): { remove: () => void; }; /** * 监听下载取消事件 */ static addDownloadCancelledListener(listener: (event: OfflineMapCancelledEvent) => void): { remove: () => void; }; /** * 移除所有监听器 */ static removeAllListeners(): void; } /** * 默认导出管理类 */ export default OfflineMapManager; //# sourceMappingURL=OfflineMapManager.d.ts.map