How to format the results of the IdentifyTask programatically

504
1
07-25-2011 04:03 PM
StephenLead
Regular Contributor III
Using the IdentifyTask, is it possible to:

1) control which attributes will be returned?
2) show aliases instead of field names?

As far as I can see, the IdentifyResults contain all attributes of the feature, and do not contain the aliases.

I'm trying to make a generic Identify tool, which will work on all layers without hard-coding the attributes and aliases. For this to work, I need to be able to specify which attributes to display, and to access their aliases.

Since IdentifyParameters can work across multiple layers, it doesn't have the option to specify which layers should be returned.

Are there any options which would allow a generic Identify tool to work?

Thanks,
Steve
0 Kudos
1 Reply
derekswingley1
Frequent Contributor
Hi Steve,

Identify always returns all attributes...see:  http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/identify.html

You could not expose certain fields in your map service but that's probably not ideal.

For the aliases, take a look at this post:  http://forums.arcgis.com/threads/7793-Identify-How-to-show-Alias-filed-instead-of-Field-Name?p=24158...
0 Kudos