Taro.choosePoi(option)
打开POI列表选择位置,支持模糊定位(精确到市)和精确定位混选。
支持情况:

类型
(option: Option) => Promise<SuccessCallbackResult>
参数
| 参数 | 类型 |
|---|---|
| option | Option |
Option
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| complete | (res: TaroGeneral.CallbackResult) => void | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
| fail | (res: TaroGeneral.CallbackResult) => void | 否 | 接口调用失败的回调函数 |
| success | (result: SuccessCallbackResult) => void | 否 | 接口调用成功的回调函数 |
SuccessCallbackResult
| 参数 | 类型 | 说明 |
|---|---|---|
| type | number | 选择城市时,值为 1,选择精确位置时,值为 2 |
| city | number | 城市名称 |
| name | string | 位置名称 |
| address | string | 详细地址 |
| latitude | string | 纬度,浮点数,范围为-90~90,负数表示南纬。使用 gcj02 国测局坐标系 |
| longitude | string | 经度,浮点数,范围为-180~180,负数表示西经。使用 gcj02 国测局坐标系 |