Leaflet.Editable icon indicating copy to clipboard operation
Leaflet.Editable copied to clipboard

geoJSON support

Open JAugustusSmith opened this issue 7 years ago • 3 comments

this doesn't seem to work

const geo = L.geoJSON(geoJsonObj).addTo(this.map); geo.enableEdit();

I get the error ERROR TypeError: geo.enableEdit is not a function

JAugustusSmith avatar Feb 22 '18 04:02 JAugustusSmith

You need to call enableEdit() on every layer element:

geo.getLayers().forEach(l => l.enableEdit())

Jadaw1n avatar Mar 28 '18 13:03 Jadaw1n

If you have a lot of layers, choose to enable editing individually

L.geoJSON(geoJsonObj, {
            onEachFeature: function(feature, layer){
                layer
                    .on('dblclick', L.DomEvent.stop)
                    .on('dblclick', layer.toggleEdit);
            }
        })

ilariodavid avatar Jul 23 '19 17:07 ilariodavid

Marker or Point is not dragable.

desaikalpesh34 avatar Oct 09 '20 10:10 desaikalpesh34