重新设置起点、终点图标:
var driving = new BMap.DrivingRoute(_this.mapModel, {
renderOptions: {
map: _this.mapModel,
autoViewport: true
}
});
//重新设置起始点,终点图标和偏移
var startIcon = new BMap.Icon(require('../assets/support/ic_qidian.png'), new BMap.Size(30,120),{anchor: new BMap.Size(10, 25),});
var endIcon = new BMap.Icon(require('../assets/support/ic_zhongdian.png'), new BMap.Size(30,120),{anchor: new BMap.Size(10, 25),});
_this.driving.setMarkersSetCallback(function(result){
result[0].marker.setOffset(new BMap.Size(0, 40));
result[0].marker.setIcon(startIcon);
result[1].marker.setOffset(new BMap.Size(12, 45));
result[1].marker.setIcon(endIcon);
})
var driving = new B