ADDING LEGEND TO API MAP

620
2
02-13-2013 07:35 AM
JeremySila
New Contributor
I'm trying to find documentation on adding a simple legend to my API map. I have attempted to use the samples but my legend is not displaying the symbols. I have come across a few forums that have stated that my map MUST be made public in order for the legend to work correctly. I'm new to API and currently only have my counties network to share my maps with fellow employees. Do I need toconfigure my servers IIS settings for public access in order to get my legend to work correctly?
0 Kudos
2 Replies
ReneRubalcava
Frequent Contributor
ArcGIS Server 10.0 SP1 is the minimum requirements to use the legend dijit without needing a publicly available server.
http://help.arcgis.com/EN/webapi/javascript/arcgis/jsapi/#legend

If the layer is an ArcGISDynamicMapServiceLayer or ArcGISTiledMapServiceLayer created using ArcGIS Server 10.0 SP1 or higher the legend is generated using the REST Map Service legend resource.


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.
0 Kudos
JeremySila
New Contributor
Well for the time being I'm using 9.3 so that solves that. Thank you so much for sharing your knowledge!
0 Kudos