Plugins - GeoKit
Add to favoritesThis plugin provides key functionality for location-oriented Rails applications:
- Distance calculations, for both flat and spherical environments. For example, given the location of two points on the earth, you can calculate the miles/KM between them.
- 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 geocoder the user's location based on IP address, and retain the location in a cookie.
The goal of this plugin is to provide the common functionality for location-oriented applications (geocoding, location lookup, distance calculation) in an easy-to-use package.
