web页面调起地图APP(高德地图、百度地图、腾讯地图)

web页面调起地图APP(高德地图、百度地图、腾讯地图)

在没有安装APP的情况下可以用web端地图

路线规划为例:

一、腾讯地图

  1. web端

官方文档地址:https://lbs.qq.com/webApi/uriV1/uriGuide/uriWebRoute

例:

<a href="https://apis.map.qq.com/uri/v1/routeplan?fromcoord=CurrentLocation&type=bus&to=北京市丰台区北京西站&tocoord=39.90083463437583,116.32810279404168&policy=2&referer=yunjiaHUD">腾讯WEB</a>
  1. 安卓或IOS(h5页面调起腾讯地图APP)

官方文档地址:https://lbs.qq.com/webApi/uriV1/uriGuide/uriMobileRoute

例:

<a href="qqmap://map/routeplan?fromcoord=CurrentLocation&type=bus&to=北京市丰台区北京西站&tocoord=39.90083463437583,116.32810279404168&policy=2&referer=yunjiaHUD">腾讯IOS/安卓</a>

二、百度地图

  1. web端

官方文档地址:https://lbsyun.baidu.com/index.php?title=uri/api/web

例:

<a href="http://api.map.baidu.com/direction?origin=&destination=name:北京市丰台区北京西站|latlng:39.90083463437583,116.32810279404168&coord_type=&mode=transit&output=html&src=ios.baidu.openAPIdemo">百度WEB</a>
  1. 安卓端(安卓手机、H5调起百度地图APP)

官方文档地址:https://lbsyun.baidu.com/index.php?title=uri/api/android

例:

<a href="bdapp://map/direction?origin=&destination=name:北京市丰台区北京西站|latlng:39.90083463437583,116.32810279404168&coord_type=bd09ll&mode=transit&src=ios.baidu.openAPIdemo">百度安卓</a>
  1. IOS端(苹果手机、H5调起百度地图APP)

官方文档地址:https://lbsyun.baidu.com/index.php?title=uri/api/ios

例:

<a href="baidumap://map/direction?origin=&destination=name:北京市丰台区北京西站|latlng:39.90083463437583,116.32810279404168&coord_type=bd09ll&mode=transit&src=ios.baidu.openAPIdemo">百度IOS</a>

三、高德地图

  1. web端

官方文档地址:

例:https://lbs.amap.com/api/uri-api/guide/travel/route

<a href="https://uri.amap.com/navigation?from=&to=116.32810279404168,39.90083463437583,北京市丰台区北京西站&mode=bus&policy=0&src=&coordinate=&callnative=0">高德WEB</a>
  1. 安卓端(安卓手机、H5调起高德地图APP)

官方文档地址:https://lbs.amap.com/api/amap-mobile/guide/android/route

例:

<a href="amapuri://route/plan/?sid=&did=&dlat=39.90083463437583&dlon=116.32810279404168&dname=北京市丰台区北京西站&dev=0&t=1">高德安卓</a>
  1. IOS端(苹果手机、H5调起高德地图APP)

官方文档地址:https://lbs.amap.com/api/amap-mobile/guide/ios/route

例:

<a href="iosamap://path?sid=&did=&dlat=39.90083463437583&dlon=116.32810279404168&dname=北京市丰台区北京西站&dev=0&t=1">高德IOS</a>

猜你喜欢

转载自blog.csdn.net/qq960685827/article/details/129457261
今日推荐