3

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?

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.