Closed chintanp closed 4 years ago
@chintanp I see two bugs.
One of the features of leafpm
over leaflet.extras
is the easier manipulation of existing layers. You are correct in targetLayerId
is the way to control the behavior. Unfortunately leafpm
does not currently disable edit with layers added after initial render. I'll try to make this change, and have added this to https://github.com/r-spatial/leafpm/issues/2 to track.
There is a bug that I noticed yesterday, and the behavior has changed. Deleting one feature deletes all in the layer. This should not happen. I have created a new issue https://github.com/r-spatial/leafpm/issues/3.
Issue pertaining to leafpm
tracked elsewhere, closing this for now, as we do not see this with leaflet.extras
and therefore is external to mapedit
.
I don't think this is the intended behavior and/or how it should be avoided, but if I add markers using
leafletProxy
, then those markers can be removed from theleafpm
toolbar remove button. This does not happen withleaflet.extras
.The behavior can be seen in this video:
And the code is as below:
Is there a way, I can avoid
leafpm
from deleting already existing features on the map? I tried this with and withouttargetLayerId
and got the same result.