I have a little side project where I allow radius search. You input a city, state (or a zipcode) and a radius, and I return results based on the zip codes returned. This currently relies on php and mysql. I would like to move this process client-side.
I’m coming up short finding a solution using YQL, so I’m wondering if anyone else has an idea or a nudge in the right direction.
Cheers.
This isn’t YQL, but it may help. Personally, I’d look for a database of ZIP codes with a latitude/longitude. When you/the users specifies a ZIP code and a radius, you can then query the lat/lng of their entry and then perform a lookup for other ZIP codes nearby.
This is a radius search that takes into account the curvature of the earth for calculations:
https://developers.google.com/maps/articles/phpsqlsearch
The fun part:
Failing that, you could always look for an API (perhaps Google’s navigation/directions) and retrieve the total (driving) distance between 2 ZIP codes.
Hope that helps