How do I get to the appropriate legend icon data from within listItemCreatedFunction and add the icon graphic to a Layerlist item?
I am adding a legend to a LayerList with the legend button to the right of the layer title, and the legend icon graphic below the layer title.
added with the code here
I want to change this so that the legend icons are added to the LayerList Listitems instead.
(image is from a web app. builder. I am not using wab)
Not sure which part of the question are you stuck with
Do you need help getting the legend?
You can get the legend from
Or do you need help getting the legend to appear under the layerlist item
I need to add the legend icon to appear within each listitem. I will add a button beside the layer to toggle open\close state of all the listitems.
Web Layer Title [icon-button] <--- click button to open layer legend
Web Layer Title [icon-button] <--- click button to close layer legend