0

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. :)

0

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.

| improve this answer | |
  • 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. – Nigel Waters Apr 9 '14 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)? – Sidney Gijzen Apr 9 '14 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. – Nigel Waters Apr 10 '14 at 16:16
0

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.

| improve this answer | |

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.