GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
extendedFindNearby  XML
Forum Index -> General
Author Message
xafnee



Joined: 06/08/2012 22:00:16
Messages: 2
Offline

Hello All

I found a strange thing (perhaps not for you) happening

I use the following url's (i changed the username)

http://api.geonames.org/extendedFindNearby?lat=34.14960000&lng=-117.838330&username=demo&style=full

but i want it in this form

http://api.geonames.org/extendedFindNearby?lat=36.20187000&lng=-117.824360&username=demo&style=full

(this is also in california, so why the difference)

Is it posible to force it to get it in the latest form ?

I really need the last setup also in Los Angeles etc.

Thanks in advance.
marc



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

Hi xafnee


The extendedFindNearby service is a combination of several services and returns different results depending on the location.

You can get the the result you require with the hierarchy service:
http://api.geonames.org/hierarchy?geonameId=5354905&username=demo&style=full

The hierarchy service does not yet understand the lat/lng params and needs a geonameId. You can get this with
http://api.geonames.org/findNearbyPlaceName?lat=36.20187000&lng=-117.824360&username=demo&style=full

The later call may even have all information you require, so that the hierarchy service is not required.

Best Regards

Marc

[WWW]
xafnee



Joined: 06/08/2012 22:00:16
Messages: 2
Offline

Hello Marc

Sounds great, but i still have a question.

Based on
http://api.geonames.org/extendedFindNearby?lat=34.14960000&lng=-117.838330&username=demo&style=full

how do i know the geonameId id need in the url you described ?

http://api.geonames.org/hierarchy?geonameId=5354905&username=demo&style=full

How can i get the geonamesId based on lon and lat ?

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