Select to view content in your preferred language

legend in Flex API

919
1
11-02-2012 04:52 PM
Jeanlamou
Emerging Contributor
Hello, I ama using the Arcgis server API for flex (2.5).

I am using only a Dynamic Layer (ArcGISDynamicMapServiceLayer) in my esri:Map tag.
I tried to define a legend based on the following example : http://help.arcgis.com/en/webapi/flex/samples/index.html#/Legend_Component/01nq0000004r000000/


However, it doesn't work, the legend is not displayed. I don't know why.

P.S. I dont' have a ATiledMapServiceLayer. do you thing that I should have one ?

Thank you

Jean
Tags (2)
0 Kudos
1 Reply
BjornSvensson
Esri Regular Contributor
Hello, I ama using the Arcgis server API for flex (2.5).\
...
However, it doesn't work, the legend is not displayed. I don't know why.

Does the map display correctly?
Does the legend display the no-layers icon?
What version of server do you use?  You will need ArcGIS Server 10.1 SP1 or later (see requirements at http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/components/Legend.html)
If you go to the service directory (something like http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer), does it show "Legend"?

P.S. I dont' have a ATiledMapServiceLayer. do you thing that I should have one ?

You don't need to. Depending on what you are trying to do, it might be good to have one...
0 Kudos