admin管理员组

文章数量:1582956

直接通过链接跳转即可唤起高德地图APP或者百度地图APP,示例如下:

        var s = startAddressInfo;//起点地址信息
        var e = endAddressInfo;//终点地址信息
      if (type === 'gaode') {
        location.href = `https://uri.amap/navigation
          ?from=${s.slng},${s.slat},${s.slocation}
          &to=${e.lng},${e.lat},${e.location}
          &mode=car&callnative=1&coordinate=wgs84&src=mypage`;
      } else if (type === 'baidu') {
        location.href = `http://api.map.baidu/mobile/direction
          ?origin=latlng:${s.slng},${s.slat}|name:${s.slocation}
          &destination=latlng:${e.lat},${e.lng}|name:${e.location}
          &origin_region=${s.scity}&destination_region=${e.city}
          &mode=driving&output=html&src=webapp.baidu.openAPIdemo&coord_type=wgs84`;
      }

高德地图文档

百度地图文档

 Web版百度地图面向PC&移动端浏览器的网站应用或移动APP应用,其中PC浏览器调起的百度地图地址为:百度地图http://map.baidu/ ;移动端调起的百度地图地址为:百度地图http://map.baidu/mobile/

本文标签: 地图页面app调起高德