Closed Jamesxiehailong closed 6 years ago
你的示例里面,设置了 3 点,但是途径点并没有显示出来,我从你的那个示例去掉了最后一个坐标点,地图呈现的规划路径没有变化,这个地方是默认取前两个坐标进行规划么?我在想对应完成的功能和下面这个例子很相似this
对了当前我使用的组件库版本是 "react-amap": "^1.2.3",我去加载货车规划路劲的插件,进入不了回调。所以才打算用普通驾车的api,这个和版本有关系么?谢谢啦!(≧▽≦)/
AMap.TruckDriving
是高德 JSSDK 1.4.4 版本添加的功能。react-amap 默认使用 1.4.0
,可以使用 version 来指定版本。
<Map version="1.4.4">
....
</Map>
这相当于我之前写的方式this,控制台有一个报错,我这样写,在那个回调中我打了debugger,不能进入
恩恩,好的。我明白了。谢谢啦。O(∩_∩)O!
请教如何clear driving.search的显示结果,传入新的参数后发现原先的路径还在
发现可以直接调用 map.clearMap() 。。。
我打算使用驾车路线的路径规划api,设置多个途径点,不能成功, 这是我的map中子组件的写法
父组件: