geoJSON support
JAugustusSmith opened this issue · 3 comments
JAugustusSmith commented
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
Jadaw1n commented
You need to call enableEdit() on every layer element:
geo.getLayers().forEach(l => l.enableEdit())
ilariodavid commented
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);
}
})
desaikalpesh34 commented
Marker or Point is not dragable.