2

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.