Select to view content in your preferred language

No Legend in webmap

3944
6
Jump to solution
05-12-2012 07:56 AM
ZorbaConlen
Deactivated User
My web map will not display a legend. When it loads in the arcgis.com viewer, on the legend tab it displays "Creating Legend" for a moment, then displays "No Legend". The map is using a map service published to arcgis.com with my EDN license. Its only accessible on my internal network. The map service is based on an msd file with several layers.

Any ideas? Is there some way I can debug the issue using firebug or the like?

Thanks
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
ZorbaConlen
Deactivated User
Turns out that the legend works differently depending on the version of the map service. If the map service was published with arcgis server version 10 sp1 or later, then the legend widget uses the REST api and the legend will work even if the map service is only available on an internal network. If the service is published from version 10 with no sp, it uses arcgis.com legend service and restrictions apply.

Check the rest endpoint for your service. If there is a not a link for "Legend", you are dealing with an older version map service using arcgis.com. To ensure use of the rest api, you must install current service pack (sp4), for arcgis server web services. Also need to re-run the post install for arcgis server.

View solution in original post

0 Kudos
6 Replies
MikeMinami
Esri Notable Contributor
The service has to be externally available in order to generate a legend.

Thanks,

Mike
0 Kudos
ZorbaConlen
Deactivated User
Mike,
Thanks for the info. I assume this is a technical limitation. Is there any plan to address this in the next version?
0 Kudos
ZorbaConlen
Deactivated User
Turns out that the legend works differently depending on the version of the map service. If the map service was published with arcgis server version 10 sp1 or later, then the legend widget uses the REST api and the legend will work even if the map service is only available on an internal network. If the service is published from version 10 with no sp, it uses arcgis.com legend service and restrictions apply.

Check the rest endpoint for your service. If there is a not a link for "Legend", you are dealing with an older version map service using arcgis.com. To ensure use of the rest api, you must install current service pack (sp4), for arcgis server web services. Also need to re-run the post install for arcgis server.
0 Kudos
JustinShepard
Deactivated User
Solution didn't work completely.
I have a similar problem of the legend not building correctly in my ArcGIS Online web map. I get that the legend is going to try and hide layers that aren't being displayed. In this case though the legend isn't showiing anything (even though features are drawing on the map) until I zoom in to a certain scale.

We're hosting the services on ArcGIS Server 10.04 and there is a Legend service that is supporting REST (sorry can't share the URL).

I'm not sure why the legend would show at some scales and not at all at other scales.
0 Kudos
tempJamiePowell
Emerging Contributor
I believe the items in the legend not being present based on scales is by design. Please look at the following sample
from the JavaScript API. Zoom way out. You will notice that the items in the legend are not present at the larger scales. If you zoom in gradually, you will notice the items appearing in the legend.

http://help.arcgis.com/en/webapi/javascript/arcgis/demos/widget/widget_legend.html
0 Kudos
JustinShepard
Deactivated User
Scale dependency makes sense, however if the feature is drawing on the map then it should be at a visible scale and therefore it should show in the legend. Which in my testing it did not... that is to say the features displayed in the map but the legend didn't show them until I changed the scale. Why would the legend have a different scale dependency than the map?
0 Kudos