In OpenLayers 2, I could easily create a Control to draw an ellipse like this:
new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.RegularPolygon, {
handlerOptions: {
sides: 40,
irregular: true
},
});
In OpenLayers 4, as I assume, it must be done like this:
new ol.interaction.Draw({
source: source,
type: 'Circle',
geometryFunction: geometryFunctionThatCreatesEllipse
});
Am I right and if yes, how does the geometryFunctionThatCreatesEllipse
look like?