百度地图画线

艾意蕴
2023-12-01
基本代码如下
var overlays=[];
//定义线的样式
var styleOptions = {
    //icons:[draw_line_direction(6)],
    strokeWeight: '4',
    strokeOpacity: 1,
    color:'ffff00'
};
overlays.push(new BMap.Point(point1, point2));
var polyline = new BMap.Polyline(overlays, styleOptions);
map.addOverlay(polyline);
 类似资料: