Select to view content in your preferred language

How to show the legend from a local ArcGIS Server 10.0 map service

627
1
12-17-2012 06:12 AM
JoseSanchez
Frequent Contributor
Hi all,

I am trying to display the legend for a local map service created in my workstation with ArcGIS Server 10.

The legend shows using Esri service
  var dynamicUrl = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyHazardsandRisks/...";


But it does not show with any of my local services:
     
       var dynamicUrl = "http://<myserver>/ArcGIS/rest/services/OneLayer/MapServer";
       var dynamicUrl = "http://<myserver>/ArcGIS/rest/services/MapDefault/MapServer";

Is there anything I need to check to see my local ArcGIS Server map services.

I am using this template sample http://help.arcgis.com/en/webapi/javascript/arcgis/samples/layout_MapContainerSplitLeft/index.html

Thanks
0 Kudos
1 Reply
JeffPace
MVP Alum
according to the API

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