Select to view content in your preferred language

Want to choose specific features and ensure that they don't show up in the Legend widget (for reasons such as having only one color)

392
1
Jump to solution
08-12-2024 10:50 AM
andrewc213
Emerging Contributor

andrewc213_0-1723484885574.png
As you can see from this Legend, I have Layers whose color keys are showing up in the Legend widget, but since it's already obvious to the user what a Layer's color key means (if there's only one color to begin with), there's no need for all these Layers, for instance, to show up in the Legend. I'm trying to figure out how to prevent these Layers from showing up in the Legend, but there doesn't seem to be a clean and/or simple solution to it.

I'm using TypeScript ReactJS.

 

0 Kudos
1 Solution

Accepted Solutions
JoelBennett
MVP Regular Contributor

If you don't want a given layer to appear in the Legend, you can set its legendEnabled property to false.

View solution in original post

0 Kudos
1 Reply
JoelBennett
MVP Regular Contributor

If you don't want a given layer to appear in the Legend, you can set its legendEnabled property to false.

0 Kudos