# requestLocation ^6.2.0
当前定位的周边地址
# 请求参数
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
param | Object | Y | {}属性: operation:{Type: String, Default: N/A, Description: requestLocation} | 请求参数 |
# 接口调用示例
this.$bridge
.requestLocation(param)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
# 返回参数
- 成功时返回
| Prop | Type | Default | Description |
|---|---|---|---|
status | Number | 0/1 | 0失败 / 1成功 |
address | object | 附表1 | 响应的地址对象 |
- 失败时返回
| Prop | Type | Default | Description |
|---|---|---|---|
status | Number | 0/1 | 0失败 / 1成功 |
address | object | 附表1 | 响应的地址对象 |
- 附表1:
address参数
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
latitude | String | N | N/A | 纬度 |
longitude | String | N | N/A | 经度 |
cityCode | String | N | N/A | 城市编码 |
adCode | String | N | N/A | 行政编码 |
country | String | N | N/A | 国家 |
province | String | N | N/A | 省 |
city | String | N | N/A | 城市 |
district | String | N | N/A | 区 |
street | String | N | N/A | 街道 |
streetNumber | String | N | N/A | 街道号码 |
poiList | Array | N | 见附表2 | 名称和地址 |
- 附表2:
poiList参数
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
name | String | N | N/A | 响应的名称 |
address | String | N | N/A | 响应的地址 |