I’ve created a plugin that will help you implement radius-based
location searches from a zip code or city/state. This plugin is based
on work I did for WalkingBoss (http://walkingboss.org).
This plugin includes everything you need to get started, including free
zip code data (about 45,000 zips and city/states), and a fully
functional ZipCodeSearchExampleController with a view.
Here are the quick installation instructions:
ruby script/plugin install
ruby script/generate zip_code_search ZipCode
rake migrate # This will take a long time!
Then visit: http://localhost:3000/zip_code_search_example/index to see
the example controller in action.
See http://zipcodesearch.rubyforge.org/ for more info.
I’d like to thank Thomas Kurek, who posted the WGS-84 datum
approximation code (in C#) on which this plugin is based (see:
[Sorry if this posts twice–I tried the Google G. interface earlier
and that didn’t seem to work.]