export {}; declare global { namespace AMap { interface GeocoderOptions { city?: string; radius?: number; lang?: string; batch?: boolean; extensions?: string; } interface GeocoderResult { info: string; count: number; geocodes: GeocodeItem[]; } interface GeocodeItem { country: string; province: string; city: string; citycode: string; district: string; street: string; number: string; adcode: string; location: string; level: string; } interface ReGeocoderResult { info: string; count: number; regeocode: RegeocodeItem; } interface RegeocodeItem { addressComponent: AddressComponent; roads: Road[]; formattedAddress: string; roadinters: Roadinter[]; pois: POI[]; aois: AOI[]; } interface Neighborhood { name: string; type: string; } interface Building { name: string; type: string; } interface BusinessArea { location: string; name: string; id: string; } interface Road { id: string; name: string; distance: string; direction: string; location: string; } interface Roadinter { distance: string; direction: string; location: string; first_id: string; first_name: string; second_id: string; second_name: string; } interface AOI { id: string; name: string; adcode: string; location: string; area: string; distance: string; type: string; } interface AddressComponent { country: string; province: string; city: string; citycode: string; district: string; adcode: string; township: string; towncode: string; neighborhood: string; building: string; street: string; streetNumber: string; seaArea: string; businessAreas: BusinessArea[]; } type GeocoderCallback = (status: "complete" | "error" | "no_data", result: GeocoderResult | Error | 0) => void; type ReGeocoderCallback = (status: "complete" | "error" | "no_data", result: ReGeocoderResult | Error | 0) => void; class Geocoder { constructor(option: GeocoderOptions); getLocation(keyword: string, callback: GeocoderCallback): void; setCity(city: string): void; getAddress(location: LngLat | LngLat[], callback: ReGeocoderCallback): void; } } }