Skip to content

Commit

Permalink
type: fix Geocoder type error. #330
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 6, 2023
1 parent 5ec8fa3 commit 5508828
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/types/src/control.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,21 @@ declare namespace AMap {
*/
class Geocoder extends Control {
constructor(opts: GeocoderOptions);
/** 将地址信息转化为高德经纬度坐标信息 */
getLocation?(keyword: string, ReGeocoderCallback)
/** 地理编码时,设置地址描述所在城市 */
setCity(city: string)
/** 将高德经纬度坐标信息转化为结构化的地址信息 */
getAddress(location: LngLat | LngLat[], ReGeocoderCallback)
}
interface ReGeocoderCallback {
(status: string, result: ReGeocoderResult): void
}
interface ReGeocoderResult {
info: string
regeocode: {
formattedAddress: string
}
}
interface GeocoderOptions {
/**
Expand Down

1 comment on commit 5508828

@vercel
Copy link

@vercel vercel bot commented on 5508828 Sep 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react-amap – ./

react-amap-one.vercel.app
react-amap-398188662.vercel.app
react-amap-git-master-398188662.vercel.app

Please sign in to comment.