Address Locator Geocode Service with javascript

3403
2
Jump to solution
08-25-2014 08:48 AM
JakeGalyon
New Contributor III

I have successfully created a geocode service that is tied into our new GIS website.  I updated the service when we received new addressing data.  New Service works great in arcmap and in the services directory i am getting results.  However, when i update the javascript to reflect the new service URL the new addresses can't be found.  The old addresses that haven't changed still work and can be searched.  Any ideas on something else i may need to change in the js?  I was considering overwriting the service or delete and replace with the same exact service name, but haven't worked up the courage to do so in case in breaks something.  I would appreciate any input.  Thanks!

 

Jake

0 Kudos
1 Solution

Accepted Solutions
PaulCrickard1
Occasional Contributor II

Yeah, if you are creating a geocoding service on ArcServer, you should not need to change the url. It will always be the same. It should be something like;

http://YourDomainName/ArcGIS/rest/services/AddressLocator/GeocodeServer/findAddressCandidates

Don't know what you are using for JavaScript, but not using ESRI, you would just make an AJAX call to the url passing the parameters: Street=123 sesame street&f=json&outSR=4326

View solution in original post

2 Replies
JeffWard
Occasional Contributor III

I don't know anything about js, but you don't have to create a new locator every time you update the source data.  You should be able to stop the service, rebuild the locator, then start the service again.  I have this set up in a geoprocessing model.

Jeff Ward
Summit County, Utah
0 Kudos
PaulCrickard1
Occasional Contributor II

Yeah, if you are creating a geocoding service on ArcServer, you should not need to change the url. It will always be the same. It should be something like;

http://YourDomainName/ArcGIS/rest/services/AddressLocator/GeocodeServer/findAddressCandidates

Don't know what you are using for JavaScript, but not using ESRI, you would just make an AJAX call to the url passing the parameters: Street=123 sesame street&f=json&outSR=4326