# searchMapAddress ^5.0.0
根据模糊地址,返回地图服务的查询结果数据
# 请求参数
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
param | Object | Y | {}属性: city:{Type: String, Default: N/A, Description: 需要查询的城市(范围)必选 } keyword:{Type: String, Default: N/A, Description: 需要查询的地址 必选 } | 请求参数 |
# 接口调用示例
this.$bridge
.searchMapAddress(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 | N/A | 0 查询成功 |
resultList | Array | [{}]属性: city:{Type: String, Default: N/A, Description: 市名称 } district:{Type: String, Default: N/A, Description: 区名称 } key:{Type: String, Default: N/A, Description: 地址名称 } longitude:{Type: String, Default: N/A, Description: 经度 } latitude:{Type: String, Default: N/A, Description: 纬度 } uid:{Type: String, Default: N/A, Description: 用户uid } | 返回地区的对象数组 |
- 失败时返回
| Prop | Type | Default | Description |
|---|---|---|---|
errorCode | Number | N/A | -1 搜索失败 |
# 返回示例
result: {
status: 0,
resultList: [{
district: "南山区",
city: "深圳市",
key: "A8音乐大厦",
latitude: "113.234",
longitude: "23.23",
uid: "1816533476d3a51dfa2d618b"
},
{
district: "南山区",
city: "深圳市",
key: "a8live",
latitude: "113.54",
longitude: "23.13",
uid: "1816533476d3a51dfa2d1b"
}]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19