var p1 =new BMapGL.Point(115.998104,29.574345)
var p2 =new BMapGL.Point(115.983762,29.56479)
var driving = new BMapGL.DrivingRoute(that.map);
driving.search(p1, p2); //第一个驾车搜索
driving.search(P2, p3); //第二个驾车搜索
driving.setSearchCompleteCallback(function(){
var pts = driving.getResults().getPlan(0).getRoute(0).getPath(); //通过驾车实例,获得一系列点的数组
var polyline = new BMap.Polyline(pts);
map.addOverlay(polyline);
})