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.]
Fantastically helpful, Doug! I was in the beginning processes of
building this feature set in my application. Nice to know I can just
install a plugin.
I was not able to find a license listed. Are you releasing MIT?
David Andrew T.
On 10/31/06, Phrogz [email protected] wrote:
Wow, fantastic! Thanks!
That’s huge. I imagine it might make a nice integration with google
Yes, I’m releasing it under the MIT license. You are free to do
whatever you want with the code–in fact, I intend for users to tweak
the app/models/zip_code.rb model according to their needs (for
instance, to change radius units to meters or kilometers). That’s why
I chose to make the plugin copy code directly into the application.
On Oct 31, 10:26 am, “David Andrew T.”
You could certainly do some cool things with zip code searches and
Google Maps, but this plugin doesn’t support any Google Maps
integration. You could easily customize it to do that within your