Skip to content

Commit

Permalink
Support for multiple ip geocoders. Requires an update to the Geokit G…
Browse files Browse the repository at this point in the history
…em also.

This feature depend on the following external dependancy, first commited as:
pull url = git@github.com:dreamcat4/geokit-gem.git
4f1c20455d3d7cf3dabe17bc492012a19d7aa000 Support multiple ip geocoders, including new setting for ip_provider_order

However the changes may have been published as a different commit. To be sure:
If your geokit gem is up to date (and greater than 1.3.0), then it may include the following line:

$GEOKIT_GEMDIR/lib/geokit/geocoders.rb:73:
+    @@ip_provider_order = [:geo_plugin,:ip]
  • Loading branch information
dreamcat4 committed May 2, 2009
1 parent 4c34ca1 commit b2d6063
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/geokit-rails/acts_as_mappable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def extract_bounds_from_options(options)

# Geocode IP address.
def geocode_ip_address(origin)
geo_location = Geokit::Geocoders::IpGeocoder.geocode(origin)
geo_location = Geokit::Geocoders::MultiGeocoder.do_geocode(origin, true)
return geo_location if geo_location.success
raise Geokit::Geocoders::GeocodeError
end
Expand Down

0 comments on commit b2d6063

Please sign in to comment.