I have problem in leaflet events. I want use this event: [link]https://leafletjs.com/reference-1.6.0.html#map-overlayadd this event over lay add (Fired when an overlay is selected through the layer control).
I want when selected any layers through the layer control save layer name in var Name. How can I this? I have 3 layers.