GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Geonames webservice execption  XML
Forum Index -> General
Author Message
nicarcola



Joined: 06/02/2007 12:13:27
Messages: 26
Offline

The problem IS that reverse geocoding of country and subdivision doesn't come back in the callback function in case I call it with lat and lng from the UK or, if you want in case of an error.

This was the answer of Marc:
You are right this was a bug in the web service. It ignored the callback parameter in case of an exception. This is fixed now.

It still doesn't work? I put an alert in the callbak but I get only a message with lat and lng from outside the UK.
marc



Joined: 08/12/2005 07:39:47
Messages: 4416
Offline

Do you have an example where it does not work?

Here it returns :
http://ws.geonames.org/countrySubdivisionJSON?lat=51.03&lng=-20&callback=callbackFunction

[WWW]
nicarcola



Joined: 06/02/2007 12:13:27
Messages: 26
Offline

http://www.test01.evaco.nl/htestgeo.php here you find an eaxample.

Good luck.
marc



Joined: 08/12/2005 07:39:47
Messages: 4416
Offline

It already fails before even calling the webservice. With an error at line :
document.getElementById('flat').value = puntlocatielat;

If you are using FF I suggest you install firebug. It really helps with javascript development : http://www.getfirebug.com/

Marc

[WWW]
nicarcola



Joined: 06/02/2007 12:13:27
Messages: 26
Offline

I took away the two statements with getelemenetbyid etc. I put an echo in the test to show you the request. Nothing wrong with that. And still no calback???
nicarcola



Joined: 06/02/2007 12:13:27
Messages: 26
Offline

I did another test today. I picked up the echo and put it in the browser. Ofcourse without the calback. When I do this with the request in the UK I get an page not found 404 error. Maybe this is of any help. I hope so.
marc



Joined: 08/12/2005 07:39:47
Messages: 4416
Offline

The 404 error helped. I have changed the server to return a 200 status ok in this case. Can you test it?

Marc

[WWW]
nicarcola



Joined: 06/02/2007 12:13:27
Messages: 26
Offline

I did the test now with the link I send you earlier. When I now put the pointer in the UK it works well for me. It comes back in the callback and set the pointer. When you set the mouse ont the pointer-icon in the UK then then you get the tooltip with country and subdivision undefined. And that is correct because the status isn't 200. If I want that changed I have to test the status in the way you aswered earlier.

This is OK with me.

In the case of a status other than 200 I always can make a search for the countrycode, maybe I do that.

Thanks so far. I hope we helped each other to make things better.


 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team