AnsweredAssumed Answered

GeoCode locator not working properly for POI or Business

Question asked by epuriarun on Jun 19, 2017
Latest reply on Jun 20, 2017 by epuriarun

Hi All,

 

We are using ArcGIS Javascript API V 3.4 with "esri/tasks/locator", "esri/tasks/AddressCandidate",

 

When searched with Business names(Startbuck, San Francico or Walmart San Ramon) the suggestion are coming properly with magickey and bound the dataset to Grid

 

But when selected a row in the data grid, for user required address. The address locator not giving proper lat, longs.

 

GeoCode locator URL: http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer 

 

Javascrpt Code snippet.

 

//Passing the one the suggestion address to get the lat,long

var newaddress = {
singleLine: item.address,
magicKey: item.Magickey
};
esrilocator.outSpatialReference = map.spatialReference;
esrilocator.addressToLocations(newaddress);
esrilocator.on("address-to-locations-complete", function (e) {

//Zoonto result lat,long

 

Checked direct URL which ESRI using  http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?SingleLine=starbucks+sydney+AUS… 

This also not working properly.

 

Anyonce faced the similar issue with esrilocator.addressToLocations

 

Please let me know your thoughts and suggestions

Outcomes