首页 新闻 会员 周边 捐助

绘制多途经点的驾车路线时起点和终点气泡跟实际起终点不匹配

0
悬赏园豆:10 [待解决问题]

 1  driving = new BMap.DrivingRoute(map, {renderOptions:{map: map, autoViewport: true}});
 2            for (var i=0;i<points.length-1;i++){          
 3               driving.search(points[i],points[i+1]);       
 4             }
 5   
 6           driving.setSearchCompleteCallback(function(){
 7                   pts = driving.getResults().getPlan(0).getRoute(0).getPath();  
 8                   polyline = new BMap.Polyline(pts,{strokeColor:"blue",strokeWeight:3,strokeOpacity:0.8});       
 9                   map.addOverlay(polyline);              
10            });
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册