What are all possible values for singleLineFieldName property while configuring search widget source for custom geocode locator?

1644
2
04-25-2016 10:38 AM
BhavinSanghani
Occasional Contributor II

Go to Search | API Reference | ArcGIS API for JavaScript  and search for singleLineFieldName. Where can I find more details about this field? As per the documentation, it looks like that the value assigned to singleLineFieldName can be different. e.g. SingleLine and SingleLineFieldName. However, I see 'Single Line Input' with my geocode service url. What are all possible values for singleLineFieldName property while configuring search widget source for custom geocode locator?

I want to make sure that I am specifying correct value for singleLineFieldName for Search widget source. I do not have control on published geocode services as my customers can configure any geocode service and hook it into my application.

Probably, one way is to query geocode service and find out what is configured with Single Line Address field. But wondering if there is any better way to configure this property.

0 Kudos
2 Replies
KenBuja
MVP Esteemed Contributor

It looks like this value is not a constant, but a field name within the REST service that contains the address in a single line

<String> singleLineFieldNameRequiredThis applies only to locator sources. It is the field name of the Single Line Address Field in the REST services directory for the locator service. Common values are "SingleLine" and "SingleLineFieldName".
0 Kudos
BhavinSanghani
Occasional Contributor II

Correct, it's (i.e. Single Line Input) a field name within the REST service. I am trying to understand how it can be different? Is there any way to modify that field name (i.e. Single Line Input)? How can I see SingleLine or SingleLineFieldName on my geocode service?

I checked specification on REST API doc Geocode Service but it appears we can only have Single Line Input field.

"singleLineAddressField": {

  "name": "Single Line Input",

  "type": "esriFieldTypeString",

  "alias": "Full Address",

  "required": false,

  "length": 100

},

0 Kudos