i want to create a LineString with round corners in OpenLayers.
In an OL version there was still the possibility to realize this via cspline:
var feature_line_one = new ol.Collection();
feature_line_one.push(new ol.Feature(new ol.geom.LineString(line_one_coords)));
var vector_line_one = new ol.layer.Vector({
name: 'Line 1',
source: new ol.source.Vector({ features: feature_line_one }),
style: function(f) {
var opt = {
tension: 0.25,
pointsPerSeg: 100
};
-------> var csp = f.getGeometry().cspline(opt);
return [ new ol.style.Style({
stroke: new ol.style.Stroke({ color:"#011A27", width:6 }),
-------> geometry: csp
})
]
}
})
But now in another OL version cspline doesn't exist anymore, I always get this error:
Uncaught TypeError: f.getGeometry(...).cspline is not a function....
thanks for help...
...any kind of help is welcome