效果截图展示:
一、高德地图举例:
1、通过接口拿到有偏差的经纬度。
2、通过高德api进行经纬度转化。经纬度转化url地址:https://restapi.amap.com/v3/assistant/coordinate/convert
3、跳转转到高德App如图:
window.location.href = "iosamap://viewMap?sourceApplication=appname&poiname=" +
"地址名称" +
"&lat=" +
"纬度" +
"&lon=" +
"经度"+
"&dev=0";
二、百度, Web服务API | 百度地图API SDK
1、通过接口拿到有偏差的经纬度。
2、通过api进行经纬度转化。
扫描二维码关注公众号,回复:
14975570 查看本文章
3、跳转转到高德App如图:
//苹果手机
window.location.href =
"baidumap://map/geocoder?location=" +
this.lat +
"," +
this.lng +
"&coord_type=gcj02&src=ios.baidu.openAPIdemo";
三、腾讯地图
window.location.href =
"qqmap://map/routeplan?type=drive&from=我的位置&fromcoord=" +
this.latitude +
"," +
this.longitude +
"&to=" +
this.address +
"&tocoord=" +
this.lat +
"," +
this.lng +
"&referer=申请的key";