I am starting working on a new, quite complicated functionality and I want to ask for some guidance regarding the way to implement it. The final aim is to give to the user the possibility to edit data of a WFS layer. Right now I have completed the editing and updating of the non spatial data.

More specifically, I used DataTables to present all the attributes/values of the WFS layer (got the values through OWSLib). I then updated the values by sending a POST request (using python Requests).

That was quite straightforward. Now I want to add geometry editing functionality.

As its shown in the screenshot, I want to add a Edit Geometry button next to Edit button. The idea is that on button click, I get a modal with the map (I will use Leaflet) and all the layer loaded.

I see there lots of Leaflet plugins for drawing. But what I want is to be able to edit only the feature of the specific row (e.g. with fid = 3). So this is my challenge. How to show the whole layer but giving editing permissions only to the feature of the selected row?

Is out there one of the leaflet plugins supporting this? Or I should customize it? Would you suggest a specific leaflet plugin for drawing/editing geometries?

enter image description here

1 Answer 1


Note that in the case of Leaflet.draw plugin, it will make editable only the layers that are provided in the Feature Group specified in edit.featureGroup option.

So you would probably just need to populate that Feature Group with the only layer(s) that you want your user to be able to edit.


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.