Hi there,
Does anyone happen to know if there is currently a way to exclude specific layers from the Legend Widget?
Regards,
Michael
I believe the best way to exclude a layer is in the Arcgis online map.
What ever legend is used in that map will display in the legend widget.
Rickey,
For Web appbuilder that method does not work for me. I still get items in my legend widget that I hid in AGOL.
-Stan
When I use a Web Map from ArcGIS Online then this does work for me.
Stan, I am not sure why yours is not working but it should.
However, I am testing out the Local Layer Widget so my layers are coming from my ArcGIS Server not AGOL.
As far as I can tell there currently seems to be no way to exclude layers from the Legend when using Local Layers.
If anyone has any suggestions that would be greatly appreciated.
Regards,
Michael
Michael,
Would excluding it from the LayerList widget and the Legend widget work for you or are you just wanting to remove it from the Legend?
Michael,
My layers are coming from our ArgGIS Server to AGOL and being used in WAB Developers edition.
If I go into the AGOL web map and hide the layer in the legend(as mentioned above), but still have the layer turned on then in WAB when the layer is turned on it shows up in the legend. To me it seems that WAB does not respect the setting in AGOL to hide items in the legend.
-Stan
Stan,
That is strange as there is definitely code in the Legend widget to handle the "showLegend" property from the webmap.
Robert,
Do you find this same issue or am I just doing something wrong?
-Stan
Stan,
I do not find the same issue. When in AGOL I can go to one of my web maps and choose hide in legend and it does not appear in the Legend Widget in WAB.
Robert,
OK I looked at it some more and found that it only happens when I hide only a sub layer in a group. When I hide the top layer in the group it works as expected.
Here is a screen shot. When I hide the TOP layer it hides all. When I hide only the buffer layer then WAB does not respect that.
-Stan