Closed mho22 closed 5 years ago
I see your purpose. However this solution is focused only in the checkboxes.
I recommend that you use instead the event overlayadd on the map. To detect that it is the layer you need, you can use L.Util.stamp(layer)
to compare properly.
map.on('overlayadd', function(ev) { console.log(ev); });
Thanks a lot for your enlightenments, I tried your solution and it worked like a charm.
Closed !
In my project's scope, I had to set an event listener to the checkbox to link the action of 'checking' it to another Component. The only way I found was to link its tag ID during the process of creation. Hope it should help.
It gives the opportunity to assign an additional event to this 'checked' event because of the retrieving of its own Tag ID
[ Possibility to link this to the _createRadioElement method too ]