I need to create regional boundaries using Geofield 2.x and Leaflet. How gan I go about doing this?

I have tried using Leaflet Widget for Geofield but it currently doesn't support the 2.x version of Geofield and the patch in the queue to make it compatible doesn't work.

I am looking for alternative method to the Leaflet Widget for Geofield module, perhaps using just Geofield.

I am not looking for a complete walkthrough. Just point me in the right direction and I will figure the rest out. :)

2 Answers 2


I think this is already possible when using Geofield with OpenLayers. Although I'm not using complex geometries in my current case, all settings indicate that the module is capable of it. E.g. if you choose in the setting of your Geofield for the storage option for 'single collection' it indicates that the widget will allow complex geometries.

  • Sorry, I need it to work with leaflet. The project calls for the leaflet library and we have already spent months building everything around it. Apr 9, 2014 at 20:42
  • No problem. I was bit confused by this sentence "...looking for alternative method, perhaps using just Geofield.", so I thought OpenLayers might be able to help you :) But you meant solely Geofield then (without any library)? Apr 9, 2014 at 21:14
  • Good point. Re-reading it, you are right. It appears I am looking for something different, when in fact I need an alternative to Leaflet Widget for Geofield. I updated the question. Thanks. Apr 10, 2014 at 16:16

It's pretty straight forward and somehow I missed it when looking to figure it out myself. I just added a Geojson field to a content type and then used http://geojson.io to build out my complex shapes then copied and pasted the geojson output into my geojson field.

Your Answer

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

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