Add icon with the description of the layer in the legend widget web appbuilder 2.1

09-05-2016 11:20 AM
Occasional Contributor II


I am using the web AppBuilder 2.1. I need to customize the widget legend, that beside each layer name, appears an icon any, that when clicked, will open an alert with the contents of the description of the layer (description, not the title). I would like some tips on how to do this, because when you try to change the widget.js file, found in the following line of code the possibility to add a css class to make the insertion of this image, however, it is only the first layer. How to do this for all the layers, and how to seek information?

this.legend = new Legend (legendParams, html.create ("div", {class "icon-description"}, this.domNode));

Thank you!

0 Replies