Select to view content in your preferred language

[ArcGIS Server 9.3, Flex viewer 2.4] Legend widget

1467
5
09-12-2011 05:43 AM
MagalyC_
Deactivated User
Hi!

I am testing the legend widget but it's not working!
The icon "no layer" is displayed...

I have read the doc:
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. 

Ok, my REST URL is publicly accessible but, how to test if my application can access to ArcGIS.com?

Thanks
Tags (2)
0 Kudos
5 Replies
BjornSvensson
Esri Alum
...how to test if my application can access to ArcGIS.com?...


Use httpfox/fiddler/charles to see if there is a request going out, and if so, its response.

But maybe most common reason - are all your layers in scale?

By default, out-of-scale layer will not show in the legend unless you set <respectcurrentmapscale>true</respectcurrentmapscale>.

<respectcurrentmapscale>
By default the legend widget will display layers and sublayers that are currently visible in the map. Optionally, you can set the respectcurrentmapscale property to false to show all layers at all scales, then layers that are not in scale will be shown - with 50% transparency. The legend automatically updates if the visibility of a layer or sublayer changes. - If true, only shows layers and sublayers for the current scale. The default is false.
// http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Legend_widget/01m30000001r000000/


Another common reason is if the (visible) layers are all rasters.
What types of layers does your service have?

What version is your server?
0 Kudos
MagalyC_
Deactivated User
I use Httpfox, one of the url is:

[HTML]http://utility.arcgis.com/sharing/tools/legend?soapUrl=http%3A%2F%2FMYEXTERNALURL%2Fservices%2Fab%5F...

And the response is:

[HTML]{"error":{"code":500,"message":"Unable to generate legends: HTTP status code {404 - Introuvable} received from server"}}[/HTML]

The URL: http://MYEXTERNALURL/services/ab_transport/MapServer is not working, the correct URL is: http://MYEXTERNALURL/rest/services/ab_transport/MapServer

But if I test:

[HTML]http://utility.arcgis.com/sharing/tools/legend?soapUrl=http%3A%2F%2FMYEXTERNALURL%2Frest%2Fservices%...

I have the same error message! 😕

My types of layers: tiled, dynamic and feature.

version 9.31.
0 Kudos
MagalyC_
Deactivated User
any suggestions ?
0 Kudos
DanielBerry
Deactivated User
Really?

"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."

What if you are running this on a closed network? I would kind of expect a dynamic legend even if you are running on a non public intranet. I work on multiple networks that do not have access to ArcGIS.com. What options do I have to have a legend? Why is ArcGIS.com required?  
Does anyone have any solutions on getting a legend to work with the 2.4 flexviewer in a closed network using ArcGIS Server 9.3.1?

Thanks in advance.
0 Kudos
eclecticlearner
Occasional Contributor
Really?

"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."

What if you are running this on a closed network? I would kind of expect a dynamic legend even if you are running on a non public intranet. I work on multiple networks that do not have access to ArcGIS.com. What options do I have to have a legend? Why is ArcGIS.com required?  
Does anyone have any solutions on getting a legend to work with the 2.4 flexviewer in a closed network using ArcGIS Server 9.3.1?

Thanks in advance.


Mr. Berry did you find an answer to this?  We are in a bit of a pridicament as we have upgraded desktop versions to 10 but we cannot upgrade ArcGIS server to 10 due to technical issues with another department.  I have yet to get ANY TOC to work using flexviewer.  It is quite frustrating and quite frankly i'm surprised at the lack of substance on this subject.  I would think many many people would be in this position using INTRANETS to run web maps all without a TOC?  It seems crazy to me.
0 Kudos