My intention is to add transparency sliders to each layer in a
L.control.layers. I was going to use a simple HTML5 slider
<input>, demonstrated here:
However, when I add an
<input> to the legend string in a
L.control.layers, I get an error:
leaflet.js:12457 Uncaught TypeError: Cannot read property 'layer' of undefined(…) _checkDisabledLayers @ leaflet.js:12457 _addItem @ leaflet.js:12411 _update @ leaflet.js:12325 onAdd @ leaflet.js:12174 addTo @ leaflet.js:11610 (anonymous function) @ index.html:144
<input> fixes the error. What's the explanation?