# launchMapApp
^5.0.0打开用户手机地图软件,传入标记地点。(打开地图软件后,用户可以使用地图软件的功能,比如导航等)
^6.2.0
`iOS` <span class="font_style">: 优先用百度地图 app , 其次是高德地图 app , 最后都没有,就使用百度 web 导航。</span><br>
`android`<span class="font_style">: 优先用百度地图app , 其次是 高德地图 app , 最后都没有,就使用百度 web 导航(用户选择合适的浏览器,原生toast引导,存在选择错误应用的风险)</span>
# 请求参数
Prop | Type | Required | Default | Description |
---|---|---|---|---|
param | Object | Y | {}附表1 | 请求参数 |
- 附表1:
param
参数
Prop | Type | Required | Default | Description |
---|---|---|---|---|
from | Object | Y | {} 属性: longitude: {Type: String, Default: N/A, Description: 经度 } latitude: {Type: String, Default: N/A, Description: 纬度 } name: {Type: String, Default: N/A, Description: 起点位置名称 } | 起点位置坐标 |
to | Object | Y | {} 属性: longitude: {Type: String, Default: N/A, Description: 经度 } latitude: {Type: String, Default: N/A, Description: 纬度 } name: {Type: String, Default: N/A, Description: 终点位置名称 } | 终点位置坐标 |
# 接口调用示例
this.$bridge
.launchMapApp(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 打开成功 |
- 失败时返回
Prop | Type | Default | Description |
---|---|---|---|
errorCode | Number | N/A | 请求失败错误码:-1 没有权限 |