I am not very good at js and new with leaflet so i my code may be a bit messy but stil... I have a problem with my legends, i have 2 legends and many overlays and i want some legends to be "linked" with some overlays. I followed every example i saw but still i have a problem with the name of the layer, it's like my names don't work so controls can't change legends properly
I made a jsfiddle that can explains more obviously my problem. http://jsfiddle.net/qs6wkru4/3/
I want the legend to change when i click on "Cuivre" and not on others...