import { Point } from '../../types'; import { GeocoderResult } from '../../types/results'; export interface GeocoderHookResult { data: GeocoderResult | Point | undefined; loading: boolean; error: Error | null; supported: boolean; /** 地址转坐标 */ getPoint: (address: string, city?: string) => void; /** 坐标转地址 */ getLocation: (point: Point, options?: unknown) => void; /** 并发批量地址转坐标;按入参顺序返回,失败位为 null。直接返回 Promise,不经过 data/loading/error */ getPoints: (addresses: string[], city?: string) => Promise<(Point | null)[]>; /** 并发批量坐标转地址;按入参顺序返回,失败位为 null。直接返回 Promise,不经过 data/loading/error */ getLocations: (points: Point[], options?: unknown) => Promise<(GeocoderResult | null)[]>; /** 设置地理编码选项(如 language 语言等),对应 SDK setOptions,2.0.4 新增 */ setOptions: (options: Record) => void; cancel: () => void; } export declare function useGeocoder(): GeocoderHookResult;