How do I replicate this "Single line address field" geocoding service?

665
6
11-20-2012 08:20 PM
StephenLead
Regular Contributor III
There's a sample geocoding service from Esri at http://tasks.arcgis.com/ArcGIS/rest/services/WorldLocator/GeocodeServer which looks like this:


Single Line Address Field:
SingleLine (Type: esriFieldTypeString, Alias: Single Line Input, Required: false )

Candidate Fields:
Score (Type: esriFieldTypeDouble, Alias: Score)
MatchLevel (Type: esriFieldTypeString, Alias: Match Level)
North_Lat (Type: esriFieldTypeString, Alias: North_Lat)
South_Lat (Type: esriFieldTypeString, Alias: South_Lat)
West_Lon (Type: esriFieldTypeString, Alias: West_Lon)
East_Lon (Type: esriFieldTypeString, Alias: East_Lon)



Which options do I need to specify in ArcCatalog to publish a similar geocoding service from a point featureclass with a single "Name" field specifying the addresses I'm searching on?

I'm choosing > New > Address Locator and choosing the "General - Single Field" option, but my geocoding service in the REST API looks like this:


Address Fields:
SingleKey ( type: esriFieldTypeString , alias: Key , required: false , length: 100 )

Single Line Address Field:
Single Line Input ( type: esriFieldTypeString , alias: Key , required: false , length: 100 )

Candidate Fields:
Shape ( type: esriFieldTypeGeometry , alias: Shape , required: false )
Score ( type: esriFieldTypeDouble , alias: Score , required: false )
Match_addr ( type: esriFieldTypeString , alias: Match_addr , required: false , length: 120 )
Ref_ID ( type: esriFieldTypeString , alias: Ref_ID , required: false , length: 40 )
Addr_type ( type: esriFieldTypeString , alias: Addr_type , required: false , length: 20 )


This isn't behaving in the same way when I try to use a geocoding call which works against the sample Esri service.

What options should I be choosing in ArcCatalog when I create the address locator, in order to replicate the Esri version?

Thanks,
Steve
0 Kudos
6 Replies
TracySchloss
Frequent Contributor
Single field is more generic than a single standard address.  Mostly you would use that for searching on fields that contain some sort of ID that is easily typed incorrectly because in general locators are more forgiving than using "find" or "query".  I've used it before to create a service to act more like a "find" on parcel IDs.  You should look at something like US Address - single.
0 Kudos
RobDunfey
Occasional Contributor
Hi Steve,

I wondered if you ever got an answer to this one, or more importantly if you can recall the answer?

We have the same issue.  I'm about to edit the loc.xml file associated with the service, but any clues appreciated.

Rob
0 Kudos
JohnGravois
Frequent Contributor
probably a better question for the Desktop/Server forum?
0 Kudos
KevinMacLeod1
Occasional Contributor III
Is this perhaps the ESRI Geocoder dijit address field issue? The geocoder dijit is hardcoded to look for "SingleLine" in the query sent via JSON. In Steve's code it is "SingleKey".

Kelly posted a workaround for this. It is posted in this thread. Example code is there as well:

http://forums.arcgis.com/threads/75070-Geocoder-dijit-in-JS-API-v3.3-bug-quot-SingleKey-quot-vs-quot...
0 Kudos
StephenLead
Regular Contributor III
I wondered if you ever got an answer to this one, or more importantly if you can recall the answer?


Sorry, I had no luck with this line of enquiry and moved on to other things. But the new Geocoder digit looks promising and might be a better approach.
0 Kudos
derekswingley1
Frequent Contributor
Is this perhaps the ESRI Geocoder dijit address field issue? The geocoder dijit is hardcoded to look for "SingleLine" in the query sent via JSON. In Steve's code it is "SingleKey".

Kelly posted a workaround for this. It is posted in this thread. Example code is there as well:

http://forums.arcgis.com/threads/75070-Geocoder-dijit-in-JS-API-v3.3-bug-quot-SingleKey-quot-vs-quot...


We fixed this at 3.4 (I posted to the original thread with the workaround as well).
0 Kudos