Open DenofTranquility opened 3 years ago
I encountered the same error trying to use Leaflet.Editable with react-leaflet. Current implementation stores references to editing markers inside of LatLng objects and any manual changes to the vector layer will override them.
The only workaround I have found so far is to call disableEdit()
before and enableEdit()
after changing bounds. This does not allow changing bounds in real time and only reliably works on dragend
and editable:vertex:dragend
events.
Hi
I am trying to update a rectangle on vertex drag and when using setBounds it returns the error:
TypeError: latlngs[i].__vertex is undefined
I have tried passing in the bounds as
new L.latLngBounds
, asnew L.latLng()
and also as an array of all 4 corners. I can't seem to get it to work, It could be that I'm missing something, any help would be appreciated Thanks