andre/geokit-rails — Issue #34: FInd suggested bounds of a country by reverse geocoding
Author: definelabs
Created: 2012-01-20 13:29:29+00:00
State: open

res = Geokit::Geocoders::GoogleGeocoder.reverse_geocode(params[:coordinate])
addresses = res.all
country = addresses.last

Above code correctly displays country as

{
"state_fips": null,
"is_us?": true,
"provider": "google",
"state": null,
"block_fips": null,
"ll": "37.09024,-95.712891",
"province": null,
"street_address": null,
"full_address": "United States",
"zip": null,
"precision": "country",
"district": null,
"country_code": "US",
"lat": 37.09024,
"city": null,
"lng": -95.712891,
"success": true,
"district_fips": null
}

How ever country.suggested_bounds is incorrectly found as
{"ne":{"lng":-115.229126,"lat":36.03131},"sw":{"lng":-115.231824,"lat":36.028612}}