Select to view content in your preferred language

Legend in Javascript Sample viewer using ags 9.3.1

881
2
01-10-2011 04:56 AM
XavierRayo
New Contributor
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.

Thanks!
0 Kudos
2 Replies
timgogl
Deactivated User
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.


source
0 Kudos
XavierRayo
New Contributor
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.

Thanks!
0 Kudos