In Openlayers 3.9.0 I am implementing a code to draw features and grab their geometry type and coordinates.
I have use to OL2 when you could create a "clean" vector layer without a source, so the user could just create new features, without seeing the old, saved ones.
In OL3 I cannot create a vector layer without a source. I dont get any errors, but when I create a pint, I dont get it on the map, even though I set a style
layerVector = new ol.layer.Vector({
style:myStyle
});
In addition a vector layer must have a source, so I can do this
var features = sourceVector.getFeatures();
and get the newly created features.
Any solution to a clean vector layer without a source or at least without loading the saved features?
Thanks