I created a map using Mapbox GL JS with several layers using this example
At the same time I don't have any spatial knowledge in Javascript. It's restrict me to create legends for each layers. The particular legend(s) must show when particular layer(s) switched on.
I find function L.mapbox.legendControl but how can I use it?