Andre Lewis has been hard at work writing our new sister book Beginning Google Maps with RAILS and Ajax. It’s due back from the printers in about a week, so on the eve of its release he has also released GeoKit for Rails along with Bill Eisenhauer. Bill also has a few examples on his site. Check them out.

From the site:

Geokit is a Rails plugin for building location-based apps. It provides geocoding, location finders, and distance calculation in one cohesive package. If you have any tables with latitude/longitude columns in your database, or if you every wanted to easily query for “all the stores within a 50 mile radius,” then GeoKit is for you.
What can GeoKit do for you?

  • Distance calculations between two points on the earth. Calculate the distance in miles or KM, with all the trigonometry abstracted away by GeoKit.
  • ActiveRecord distance-based finders. For example, you can find all the points in your database within a 50-mile radius.
  • Geocoding from multiple providers. It currently supports Google, Yahoo, Geocoder.us, and Geocoder.ca geocoders, and it provides a uniform response structure from all of them. It also provides a fail-over mechanism, in case your input fails to geocode in one service.
  • IP-based location lookup utilizing hostip.info. Provide an IP address, and get city name and latitude/longitude in return.
  • A before_filter helper to geocode the user’s location based on IP address, and retain the location in a cookie.

If this is interesting to you consider helping us get the word out for Andre and Bill by digging the announcement for them.

Keep an eye out for a chance to win a copy of his new book in the next few days and be the first in your local RUG to get it!


4 Responses to “GeoKit: A Rails Plugin for Map Applications”  

  1. 1 Oliver Dueck

    Does anyone know of something similar available for PHP applications? I would love to use some of this functionality in some of my existing apps.

  2. 2 Science

    GeoKit is great but I wanted something simpler and that could use MapQuest in addition to Yahoo and Google. It’s not flashy but it’s easy to use and works:

    http://www.misuse.org/science/2007/09/25/geox-rails-geocoding-plugin/

    I’m all for GeoKit’s continued success but if you need MapQuest support or want to do geocode in isolation of your models, you might take a look at GeoX too..

  3. 3 Ben Lam

    Is there a similar map application for PHP?

    Thanks

  4. 4 Harold Modesto

    I too am interested to know if something similar exists for PHP.

Leave a Reply