views:

31

answers:

2

On my website I would like to include a radius search for user profiles, similar to what Twitter is doing on their advanced search with "Near this places" http://search.twitter.com/advanced

I currently have a US zip code database with lat & lon data, but the site is now expanding globally. What's the best approach to adding local proximity search all around the world? Adding a zip code table for every country? How does Twitter do it?

A: 

Look into the Google Maps API.

That's how I've done this sort of thing previously. It's not particularly clear to me what you want to do (i.e. what your implementation needs, what data you have, etc) but I used a combination of this and the lat/long that you get to determine distance.

Noon Silk
A: 

What you need is a Geocoding service. There are a number of options both free and paid for. Google offer a Geocoder as part of their maps API, though rate restrictions apply, and the data must be plotted on a Google map.

e.g. http://maps.google.com/maps/api/geocode/json?address=[insert+address/postcode+here]&sensor=false

Another free option is opengeocoding.org. there are also a number of commercial options.

agough