import { SearchResult, MapSearchConfig, SearchErrorCode } from '../types';
import { LayerManager } from '../core/LayerManager';

export declare class MapSearchError extends Error {
    code: SearchErrorCode;
    userMessage: string;
    provider?: MapSearchConfig["provider"];
    cause?: unknown;
    constructor(options: {
        code: SearchErrorCode;
        message: string;
        userMessage: string;
        provider?: MapSearchConfig["provider"];
        cause?: unknown;
    });
}
/**
 * 地图搜索服务类
 */
export declare class MapSearchService {
    private config;
    private cache;
    private cacheExpiry;
    private readonly CACHE_DURATION;
    private layerManager;
    constructor(config: MapSearchConfig, deps?: {
        layerManager?: LayerManager | null;
    });
    /**
     * 搜索地址
     */
    search(query: string): Promise<SearchResult[]>;
    /**
     * 百度地图搜索
     */
    private searchBaidu;
    /**
     * 高德地图搜索
     */
    private searchAmap;
    /**
     * Google地图搜索
     */
    private searchGoogle;
    /**
     * 天地图搜索
     */
    private searchTianditu;
    private getTiandituSearchOptions;
    private createSearchError;
    private inferSearchErrorCode;
    private getResolvedProvider;
    private getDefaultSearchFailedMessage;
    private getProviderLabel;
    private resolveMessage;
    /**
     * 自定义API搜索
     */
    private searchCustom;
    /**
     * 图层属性搜索（本地矢量要素，纯列表，不进行地图操作）
     */
    private searchLayer;
    /**
     * 解析百度地图结果
     */
    private parseBaiduResults;
    /**
     * 解析高德地图结果
     */
    private parseAmapResults;
    /**
     * 解析Google地图结果
     */
    private parseGoogleResults;
    /**
     * 解析自定义API结果
     */
    private parseCustomResults;
    /**
     * 获取缓存
     */
    private getFromCache;
    /**
     * 设置缓存
     */
    private setCache;
    /**
     * 清理缓存
     */
    clearCache(): void;
    /**
     * 更新配置
     */
    updateConfig(config: MapSearchConfig): void;
    /**
     * 设置图层管理器（用于图层搜索）
     */
    setLayerManager(manager: LayerManager | null): void;
}
/**
 * 创建搜索服务实例
 */
export declare function createSearchService(config: MapSearchConfig, deps?: {
    layerManager?: LayerManager | null;
}): MapSearchService;
/**
 * 坐标转换工具
 */
export declare class CoordinateConverter {
    /**
     * 百度坐标转WGS84
     */
    static bd09ToWgs84(lng: number, lat: number): [number, number];
    /**
     * 高德坐标转WGS84
     */
    static gcj02ToWgs84(lng: number, lat: number): [number, number];
    private static transformLat;
    private static transformLng;
}
/**
 * 默认搜索配置
 */
export declare const defaultSearchConfig: MapSearchConfig;
//# sourceMappingURL=searchService.d.ts.map