Select to view content in your preferred language

Geocoding Service Not returning Candidates to "Application"

1186
4
02-11-2011 02:59 PM
KeithSandell
Regular Contributor
Alright everyone I just spent an hour on the phone with Tech Support and they're just as stumped as I am. I'm all v10.

I have a Composite Locator wired up in my app. The "Parameters" are being submitted correctly and the "onAddressToLocationsComplete" fires off successfully, but no "candidates are being returned to the "app."

I can run the geocoding service from the services directory and it returns candidates just fine.

I've put my service in the ESRI sample and same thing, no candidates to the "app." I've done everything forwards and backwards with the ESRI sample and my app, still no dice...

I can't get the candidates to "return" to the app, they're their...they'll return to the rest service in the services directory, but not to the app. No errors either.
???????????????????????????????????????

Any thoughts?
0 Kudos
4 Replies
KeithSandell
Regular Contributor
This is an update to my original issue.

I downloaded the 9.3 locator styles and created a 9.3. version locator and it worked, i.e. returned candidates to the app.

So there is most likely a bug with the v10 locator services when returning results to at least the Javascript API.

If anyone has any ideas why, please shout out!

Thanks
0 Kudos
HemingZhu
Frequent Contributor
Alright everyone I just spent an hour on the phone with Tech Support and they're just as stumped as I am. I'm all v10.

I have a Composite Locator wired up in my app. The "Parameters" are being submitted correctly and the "onAddressToLocationsComplete" fires off successfully, but no "candidates are being returned to the "app."

I can run the geocoding service from the services directory and it returns candidates just fine.

I've put my service in the ESRI sample and same thing, no candidates to the "app." I've done everything forwards and backwards with the ESRI sample and my app, still no dice...

I can't get the candidates to "return" to the app, they're their...they'll return to the rest service in the services directory, but not to the app. No errors either.
???????????????????????????????????????

Any thoughts?


Sometime is just the format of your location in locator.addressToLocations(location); Looking at your services directory's Address Fields. It listed the properties of location you have to specify. instead of using json expression, i found it is more safe to use javascript Object to specify location. Like the following:
              location = new Object();
              location.Address =string;
              location.City =string;   (Address, City... fields are different depend upon your loaction)...
try this and let me know if it works nor not.
0 Kudos
KeithSandell
Regular Contributor
Heming,

OMG! You're freaking awesome. Not for only responding, but for responding with something that works!

If you're gonna be at the Dev Summit next month find me, I own a drink. 🙂
0 Kudos
HemingZhu
Frequent Contributor
Heming,

OMG! You're freaking awesome. Not for only responding, but for responding with something that works!

If you're gonna be at the Dev Summit next month find me, I own a drink. 🙂


Very glad it helps. I learned this trick from learning AJax and started realized that javascript is just as powerful as those OO language like C# or Java (encapsulation, inheritence, polymorphism).
0 Kudos