Select to view content in your preferred language

Get Layer Description From Sublayer

749
4
07-17-2012 01:16 PM
JordanParfitt
Regular Contributor
I'm trying to display meta data on sub layers. My plan was to pull it through the API from the Description field. For example "CRS 35-1-105(c) I �?? IV" in the below service:

http://165.127.200.27/OITGISDevelopment/rest/services/GovRegions/GovRegions_CDA/MapServer/1

I'm looking for it in the API and don't see it anywhere. Is there a way to get it from the layerInfos object under the ArcGISTiledMapService object?

Thanks in advance!
Tags (2)
0 Kudos
4 Replies
AnthonyGiles
Honored Contributor
Jordan,

Just make a call to the layers rest interface and ask it to be returned as JSON i.e.

http://165.127.200.27/OITGISDevelopment/rest/services/GovRegions/GovRegions_CDA/MapServer/1?f=json&p...

You should then be able to create an object from the response and then find the relevant field you are after

Regards

Anthony
0 Kudos
DasaPaddock
Esri Regular Contributor
0 Kudos
JordanParfitt
Regular Contributor
You can also use the LayerDetails class.

See:
http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/layers/supportClasses/LayerDetails....


Is this only available if I bring it in as a feature layer? If I do it as dynamic or tiled I can't get to it right? All I see is layerInfos which only contains the name of the sublayer but no definition.
0 Kudos
DasaPaddock
Esri Regular Contributor
You can get LayerDetails in many different ways. See the "See also" links at the top of the AS Doc for LayerDetails.
0 Kudos