I am adding "draw interaction" and drawing features on a map...
webMapValues.drawObj = new ol.interaction.Draw({
features: features,
type: /** @type {ol.geom.GeometryType} */ (webMapValues.drawType)
});
I am catching the "drawend" event...
webMapValues.drawObj.on('drawend', function (e) {
//Here I am saving my feature to a data base
and displaying the saved vector...
control.UpdateObjects(e, "Draw");
//Here I would like to remove the vector that
draw interaction placed and just display the
vector from the db
});
I can not figure out how to remove the vector that ol.interaction.Draw has placed so that only the vector from the data base shows after I save it?
I guess 'drawend' is not the place to do this...but I'm not sure how to achieve the functionality I need then...
any help is greatly appreciated!!