Hi all, i'm trying to add a legend to my application but i can't. I'm using the esri javascript sample viewer. I would like to add the legend in each item in the layer tree but although i have followed all the steps that appeared in a sample, i can't. Please, can someone help me? And do you know any site with working? I haven't seen it anywhere. I'm a little bit lost on this.
does the map you are working on meet the following requirement?
If the layers are version 10 or lower the legend is created using the ArcGIS.com legend service. In order to use the ArcGIS.com legend service your map service needs to be publicly accessible and your application must be able to access ArcGIS.com.
Thanks for your answer lowgas! Yes, my service publicly accessible, but what i can't manage to do is to add the legend on my application as a new widget. I have tested it with the source of the samples area, and I can see the legend, so I think it should work. Do you know any example of the sample viewer that works using the legend widget. How can a make my application able to access arcgis.com. Sorry if that is a very simple question.