Multipolygon #268

Open
emakarov opened this Issue Jan 29, 2014 · 7 comments

Comments

Projects
None yet
8 participants

Is it possible to use this plugin with Leaflet multipolygon?

Pro777 commented Apr 18, 2014

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.

tmcw referenced this issue in mapbox/geojson.io Apr 28, 2014

Closed

Multipolygon Edit Layers JS Error #345

Owner

jacobtoye commented May 1, 2014

Yeah unfortunately Leaflet.draw does not support editing multipolygons.

jbogdani commented May 4, 2014

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:
https://github.com/yohanboniface/Leaflet.Editable/

+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
https://jsfiddle.net/Sirenhound/hotuzh7t/

You'd still need to save the shape for cancelling and save the shapeoptions to restyle it after editing, but it's a start.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment