GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
findNearbyPlaceName JSON formatting issue?  XML
Forum Index -> General
Author Message
alexalex



Joined: 27/05/2010 19:48:53
Messages: 2
Offline

Hi!

When I use the following HTTP query:

http://ws.geonames.org/findNearbyPlaceNameJSON?lat=47.6687957&lng=-122.1218329

I get the following response:

{"geonames":[{"countryName":"United States","adminCode1":"WA","fclName":"city, village,...","countryCode":"US","lng":-122.121512,"fcodeName":"populated place","distance":"0.5779","toponymName":"Redmond","fcl":"P","name":"Redmond","fcode":"PPL","geonameId":5808079,"lat":47.6739882,"adminName1":"Washington","population":47264}]}

Correct me if I am wrong, but this response does not appear to be in a JSON format?

I am trying to use the jQuery function "getJSON" and the jQuery function doesn't appear to be able to read the response.

help?
geotree


[Avatar]
Joined: 23/07/2007 18:28:40
Messages: 138
Location: France
Offline

Have a look to the HTML source here to see how to use jQuery and JSON :
http://geotree.geonames.org/geotree.html

Christophe
geotree.geonames.org
geotree.geonames.org/geotree.html
[WWW]
alexalex



Joined: 27/05/2010 19:48:53
Messages: 2
Offline

All I see is a tree of locations. There's no code there?
geotree


[Avatar]
Joined: 23/07/2007 18:28:40
Messages: 138
Location: France
Offline

right-click > view source

Christophe
geotree.geonames.org
geotree.geonames.org/geotree.html
[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team