Skip to content

地图导航

支持Apple、高德、百度、腾讯等主流地图唤起导航,调用后显示可选择地图导航列表,选择后唤起本机地图客户端进行导航。

扫码在客户端内测试 => /jcommind/mapNavigation
参数名称类型是否必填说明
endJsonY终点地址
startJsonN起始地址,不传则以当前定位为起始地址
typeNumberN0-驾车 1-公交 2-步行 3-骑行
javascript
window.CP2.mapNavigation({
  end: { name: "北京动物园", lontitude: 116.327737, latitude: 39.902463 },
  start: { name: "南京动物园", lontitude: 114.05, latitude: 22.55 },
  type: 0
}).then((res) => {
  console.log(res);
});

// {
//   "code": 1,
//   "message": "成功" 
// }