Layerlist with a Legend sample

1060
3
Jump to solution
07-16-2019 12:38 PM
AshleyPeters
Occasional Contributor III

I'm using the layerlist with a legend sample. Within the legend, I would like the symbology to always be visible, instead of the 'No Legend' verbiage appearing when the layer is turned off. If that's not possible, I need to be able to change the 'No Legend' verbiage.

Any guidance on how to make this happen would be appreciated!

Ashley

0 Kudos
1 Solution

Accepted Solutions
LizEidsness
New Contributor III

ADD some CSS.  It's all inclusive, but if needed you could give it better scope.

div.esri-legend__message {
    display: none;
 }

View solution in original post

3 Replies
LizEidsness
New Contributor III

ADD some CSS.  It's all inclusive, but if needed you could give it better scope.

div.esri-legend__message {
    display: none;
 }
Egge-Jan_Pollé
MVP Regular Contributor

Hi Liz Eidsness,

Thanks. This is cool! I did apply it immediately on one of my hobby projects (Jamhuri ya Kenya, an interactive map of the Republic of Kenya) I am working on, and it works a treat 🙂

I was always bothered by this silly "No Legend" text (or "Geen legenda" in a Dutch interface). Of course there is no legend, it is not needed, if a layer is invisible... And with your addition to the CSS it is al gone now 🙂

Thanks again,

Egge-Jan

AshleyPeters
Occasional Contributor III

Thank you Liz! I had been looking through the CSS, but had not found that option.

0 Kudos