geokit / geokit-rails

Official Geokit plugin for Rails/ActiveRecord. Provides location-based goodness for your Rails app. Requires the Geokit gem.
MIT License
1.57k stars 245 forks source link

FInd suggested bounds of a country by reverse geocoding #34

Closed definelabs closed 3 years ago

definelabs commented 12 years ago

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}}

ryankopf commented 3 years ago

I am closing all issues that are more than 6 years old now, as the gem has had significant updates and is likely people with these old issues are no longer having the issues. If you are currently still experiencing this issue or need help feel free to submit a new issue, thank you.