GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Is it possible to use this plugin with Leaflet multipolygon?
I was able to add new polygons to a Multipolygon shape using the code here: #124
Having said that, I can't get Delete or Edit to work now. I'm still slogging through this.
Yeah unfortunately Leaflet.draw does not support editing multipolygons.
Hello, it would be great to have support for multipolygons in Leaflet.Draw. My webapp loads data from a geojson file automatically exported from a QGIS project. All polygons are exported as multipolygon features and I'm not able to edit/delete these data using Leaflet.Draw.
Haven't tried it yet (but about to). Just to let everyone know that Yohan has made the drawing engine behind uMap open source recently. It supports multipolygons and looks like a good api for geojson drawing / editing:
+1 on this. MultiPolygon support would be great.
A good place to start would be to use an instance of the handler class that edits the whole FeatureGroup containing drawn items (L.EditToolbar.Edit) and point it to your Multipolygon.
I made a jsfiddle to demonstrate
You'd still need to save the shape for cancelling and save the shapeoptions to restyle it after editing, but it's a start.