我需要做的是在调用finishDrawing方法后从LineString 的最后一点开始绘制。 所以我有这个代码
var vectorSource = new ol.source.Vector();
var vectorLayer = new ol.layer.Vector({ source: vectorSource });
var drawLine = new ol.interaction.Draw({
source: vectorSource,
type: 'LineString'
});
map.addLayer(vectorLayer);
if(triggered)
drawLine.finishDrawing();
然后在另一个声明中我们应该继续从最后一个LineString点绘制
if(!triggered)//for example
//please add your solution how to continue drawing from the last point