构造函数
constructor
new Geocoder(options?: { apiSource?: string }): Geocoder 参数
- options: { apiSource?: string } = {}
方法
getLocation
getLocation( point: number[], callback: Function, opts?: Object,): | undefined | Promise<null | { address: any; addressComponents: any; point: any }> 参数
- point: number[]
- callback: Function
result
result.address
result.point
可选opts: Object
返回 undefined | Promise<null | { address: any; addressComponents: any; point: any }>
getPoint
getPoint( address: string, callback: Function, city?: string,): undefined | Promise<any> 参数
- address: string
- callback: Function
result
result.point
result.address
可选city: string
返回 undefined | Promise<any>
地理编码服务
支持以下功能:
示例
示例