GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Getting latitude and longitute  XML
Forum Index -> General
Author Message
cyberjunkie



Joined: 04/05/2011 22:58:19
Messages: 13
Offline

Hello all! I'm new to Geonames. I'm trying to find out how to retrieve the latitude and longitude for an address. I looked through the documentation but it's confusing for a beginner. I will really appreciate any kind of guidance! I'm currently using ajax for an autocomplete of cities and would also like to retrieve the lat, lng coordinates.
marc



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

GeoNames doesn't do address geocoding.

The postal code search is the closest to it:
http://www.geonames.org/export/web-services.html#postalCodeSearch

Marc

[WWW]
cyberjunkie



Joined: 04/05/2011 22:58:19
Messages: 13
Offline

Hello Marc! Thank you for the reply

I'm actually using the "q" parameter and it seems to pick up the coordinates if I put in city/town, state, country without zipcode.

I'm using an autocomplete, perhaps it picks up the zipcode as well but it's not displaying it.
marc



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

you can use the OR operator. Per default the search service is using a AND operator and if your query string contains terms that do not match it won't find anything.

Best

Marc

[WWW]
cyberjunkie



Joined: 04/05/2011 22:58:19
Messages: 13
Offline

Thanks! That's good to know! but where would I change the AND to OR?
marc



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

http://www.geonames.org/export/geonames-search.html

the parameter is called 'operator'.

Marc

[WWW]
cyberjunkie



Joined: 04/05/2011 22:58:19
Messages: 13
Offline

Ooh I looked at the list but missed it! Thank you again, you are a great help! I wish there were some tutorials for Geonames beginners. I'd love to make some once I learn it.
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team