Hi Richard, have you seen this sample? Does it meet your requirements?
https://developers.arcgis.com/javascript/latest/sample-code/widgets-layerlist-legend/
Julie
Yes. This is already offered in the LayerList widget panels.
// displays the legend for each layer list item
const layerList = new LayerList({
view: view,
listItemCreatedFunction: function(event){
const item = event.item;
item.panel = {
content: "legend"
};
}
});
This was implemented in version 4.7 (April 2018).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.