I am loading my layers from external files - I am using geojson format for it, but it's not necessary - I can use any available format.

Is there a way, how to store a circle (ol.geom.Circle) in the geojson file?

Or is there any other file format, which can be directly used in OpenLayers 3 as layer source and which can include a circle definition?


After a lot of more googling and trial - error approach I found I there are now other ways than:

1) Generate a circle myself as Polygon using sin/cos functions

2) Use Point geometry with appropriate radius attribute


You can do this


We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.