Select to view content in your preferred language

AddressParameters.OutFields cannot be defined?

2336
2
07-13-2011 12:36 PM
deleted-user-ATjHIWsdQYmT
Deactivated User
When performing a Geocode Task, I'd like to be able to specify output fields from the source data.  There is a property of .OutFields for AddressParameters however it is ReadOnly.

I don't see any way to define which fields you want to return from a Geocoding task.  Am I missing something?

The Description is as follows:
The list of fields to include in a returned result set. If you specify the shape field in the list of return fields, it is ignored. For non-intersection addresses you can specify the candidate fields as defined in the geocode service. For intersection addresses you can specify the intersection candidate fields.

I've checked the same class in the Flex API and it appears that the outfields can be defined.
http://help.arcgis.com/en/webapi/flex/apiref/index.html?com/esri/ags/tasks/supportClasses/AddressCan...
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
You can update OutFields with the following code:
AddressToLocationsParameters addressParams = new AddressToLocationsParameters()
{
 OutSpatialReference = MyMap.SpatialReference    
};
addressParams.OutFields.Add("FromAdd"); //or "*" to show all
addressParams.OutFields.AddRange(new string[] { "State", "ZIP" });


Read-only in this documentation means, you can change the instance, but you can update the collection. http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Addr...
0 Kudos
deleted-user-ATjHIWsdQYmT
Deactivated User
Thanks for the clarification.  That worked like a charm!
0 Kudos