README.markdown in geokit-1.5.0 vs README.markdown in geokit-1.6.0

- old
+ new

@@ -52,11 +52,11 @@ Geokit::default_formula = :sphere # This is the timeout value in seconds to be used for calls to the geocoder web # services. For no timeout at all, comment out the setting. The timeout unit # is in seconds. - Geokit::Geocoders::timeout = 3 + Geokit::Geocoders::request_timeout = 3 # These settings are used if web service calls must be routed through a proxy. # These setting can be nil if not needed, otherwise, addr and port must be # filled in at a minimum. If the proxy requires authentication, the username # and password can be provided as well. @@ -140,29 +140,29 @@ @ne=#<Geokit::LatLng:0x53b204 @lat=37.7968528, @lng=-122.3926933>, @sw=#<Geokit::LatLng:0x53b2b8 @lat=37.7905576, @lng=-122.3989885>> In addition, you can use viewport or country code biasing to make sure the geocoders prefers results within a specific area. Say we wanted to geocode the city of Syracuse in Italy. A normal geocoding query would look like this: - irb> res = Geokit::Geocoder::GoogleGeocoder.geocode('Syracuse') + irb> res = Geokit::Geocoders::GoogleGeocoder.geocode('Syracuse') irb> res.full_address => "Syracuse, NY, USA" Not exactly what we were looking for. We know that Syracuse is in Italy, so we can tell the Google Geocoder to prefer results from Italy first, and then wander the Syracuses of the world. To do that, we have to pass Italy's ccTLD (country code top-level domain) to the `:bias` option of the `geocode` method. You can find a comprehensive list of all ccTLDs here: http://en.wikipedia.org/wiki/CcTLD. - irb> res = Geokit::Geocoder::GoogleGeocoder.geocode('Syracuse', :bias => 'it') + irb> res = Geokit::Geocoders::GoogleGeocoder.geocode('Syracuse', :bias => 'it') irb> res.full_address => "Syracuse, Italy" Alternatively, we can speficy the geocoding bias as a bounding box object. Say we wanted to geocode the Winnetka district in Los Angeles. - irb> res = Geokit::Geocoder::GoogleGeocoder.geocode('Winnetka') + irb> res = Geokit::Geocoders::GoogleGeocoder.geocode('Winnetka') irb> res.full_address => "Winnetka, IL, USA" Not it. What we can do is tell the geocoder to return results only from in and around LA. - irb> la_bounds = Geokit::Geocoder::GoogleGeocoder.geocode('Los Angeles').suggested_bounds - irb> res = Geokit::Geocoder::GoogleGeocoder.geocode('Winnetka', :bias => la_bounds) + irb> la_bounds = Geokit::Geocoders::GoogleGeocoder.geocode('Los Angeles').suggested_bounds + irb> res = Geokit::Geocoders::GoogleGeocoder.geocode('Winnetka', :bias => la_bounds) irb> res.full_address => "Winnetka, California, USA" ### The Multigeocoder