markusand / mapboxgl-legend

Add a legend to a mapbox-gl map by parsing layer layout & paint expressions.
ISC License
49 stars 13 forks source link

Is there a way for the legend to show layers with spaces in their names? #21

Closed rjdefrancisco closed 1 year ago

rjdefrancisco commented 1 year ago

Is there a way to accept layer IDs with spaces in them? It looks like mapbox GL handles layers with spaces in their names just fine, but those don't show in the legend.

rjdefrancisco commented 1 year ago

Never mind. I found the answer (use the metadata name) in the documentation.