views:

148

answers:

4

Hi, I'm looking for an API or a combination of API's where I can send "Anjuna, India" and get back a list of places nearby. The data is mostly for "third world" countries, less so for Europe/US. Any suggestions/ideas about how to structure this?

A: 

You would need place lists with coordinates. Then go trought that list and calculate distance between cities. Then sort results by least distance. I have not done any GPS programming tho.

Pavels
+1  A: 

You could make use of a couple of Yahoo's Geo APIs in the following manner.

  1. Get woeid (Where On Earth Identifier) for input location(s)
  2. Determine neighboring places

A quick example, combining those APIs together with Yahoo's YQL would provide neighbor locations for "Anjuna, India" using the query:

SELECT * 
FROM geo.places.neighbors 
WHERE neighbor_woeid IN (
    SELECT woeid 
    FROM geo.places 
    WHERE text="Anjuna, India" 
    LIMIT 1
)

Try this in YQL Console (must be logged in)

salathe
A: 

The soon to be released Google Places API matches your requirements.

Lee