GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
findNearbyPlaceNameJSON APi call Not giving city name.  XML
Forum Index -> FAQ - frequently asked questions
Author Message
imthedeveloper



Joined: 18/02/2012 21:54:11
Messages: 1
Offline

Hello,

I want to use geonames api for detecting in which town, city and country User is present. i am using the following api

http://api.geonames.org/findNearbyPlaceNameJSON?lat=30.20211367909724&lng=71.444091796875&username=demo


Result:

{"geonames":[{"countryName":"Pakistan","adminCode1":"04","fclName":"city, village,...","countryCode":"PK","lng":71.4522222,"fcodeName":"section of populated place","distance":"0.96996","toponymName":"Nawan Shahr","fcl":"P","name":"Nawan Shahr","fcode":"PPLX","geonameId":1465408,"lat":30.1969444,"adminName1":"Punjab","population":0}]}



i have two queries regarding its result

1. i m not getting the city name in response. i.e multan. How can i get this?
2. What is "Distance" field mean. is it a Radius of that place?


Please let me know which service call should i use to get area of city and town. coz then i have to calculate the radius from that area. is your downloadable database contains this info?

Waiting for your favourable reply.
marc



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

with your query you are getting the neighbourhood first.

You can increase the radius and number of rows returned:
http://api.geonames.org/findNearbyPlaceName?lat=30.20211367909724&lng=71.444091796875&username=demo&maxRows=20&radius=10

The distance field is the distance between the given lat/lng to the centroid lat/lng of the place.

The area is not available.

[WWW]
 
Forum Index -> FAQ - frequently asked questions
Go to:   
Powered by JForum 2.1.5 © JForum Team