Select to view content in your preferred language

Reading Domains in the 2.0 API

989
1
07-07-2010 07:35 AM
DonCaviness
Occasional Contributor
I have not dug too deep into the 2.0 API or the new ArcGIS Viewer for Flex, but can anyone tell me if it is possible to read the domains and there values from a service?  I know with the 1.x API all you would get was a numerical value, a 1 instead of 'Retail'.  If this is possible now, does anyone have an example or a theory on accomplishing this?  Thanks in advance.
Tags (2)
0 Kudos
1 Reply
DasaPaddock
Esri Regular Contributor
ArcGIS Server 10 now returns domain information as part of the fields and types.
See the status field:
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer/0

This is supported in the API by getting the LayerDetails and looking at the fields and types:
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/supportClasses/LayerDetails.html

You can get LayerDetails in multiple ways. See the See Also links in the AS Doc. One link that's missing there is to FeatureLayer.layerDetails.
0 Kudos