I am working with Leaflet with nine layers and each have their own symbology like you can see in the image. For example, the first layer have 4 symbologys and you can see the colors in the map if you activate the layers, but you can see the colors in the legend all the time. I want that if you activate the layer, you can see the colors of the legend, but if i don't using this layer i only want to see the name of the layer.

Every layers is provided by a geoJson layer, i only find a solution for wms layer which is this but there the symbology is an image and the layers are wms.

Image - This is now

closed as off-topic by IvanSanchez, mgri, PolyGeo May 8 '17 at 10:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking help to debug/write/improve code must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Providing a clear problem statement and evidence of a code attempt will help others to help you. See: How to create a Minimal, Complete, and Verifiable example." – IvanSanchez, mgri, PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    What layer control are you using? Can you share the relevant part of your layer control code editing your question? – Antonio Falciano May 8 '17 at 8:39

Browse other questions tagged or ask your own question.