Geocoder Gem: Unable to reverse geocode certain Google Map results.
With the [Geocoder gem][1], using the [advanced geocoding][2] section I can't seem to get  it to work. I basically took every **Address Component Type** on the [Google Maps Documentation][3] and put it inside of the **Geocoder::Result block**:

    geocoded_by :street_address  do |obj,results|
     if geo = results.first
      obj.route = geo.route
      obj.intersection = geo.intersection
      obj.political = geo.political
      obj.country = geo.country
      obj.administrative_area_level_1 = geo.administrative_area_level_1
      obj.administrative_area_level_2 = geo.administrative_area_level_2
      obj.administrative_area_level_3 = geo.administrative_area_level_3
      obj.colloquial_area = geo.colloquial_area
      obj.floor = geo.floor
      obj.room = geo.room
     end
    end
    after_validation :reverse_geocode

But I get this error:

    NoMethodError in StoresController#create
    
    undefined method `route' for #<Geocoder::Result::Google:0x6939150>

If I remove it this object it just goes to the next one, such as `intersection`.

What is the issue here?


  [1]: https://github.com/alexreisner/geocoder
  [2]: https://github.com/alexreisner/geocoder#advanced-geocoding
  [3]: https://developers.google.com/maps/documentation/geocoding/#JSON
Geocoder Gem: Unable to reverse geocode certain Google Map results.
===

With the [Geocoder gem][1], using the [advanced geocoding][2] section I can't seem to get  it to work. I basically took every **Address Component Type** on the [Google Maps Documentation][3] and put it inside of the **Geocoder::Result block**:

    geocoded_by :street_address  do |obj,results|
     if geo = results.first
      obj.route = geo.route
      obj.intersection = geo.intersection
      obj.political = geo.political
      obj.country = geo.country
      obj.administrative_area_level_1 = geo.administrative_area_level_1
      obj.administrative_area_level_2 = geo.administrative_area_level_2
      obj.administrative_area_level_3 = geo.administrative_area_level_3
      obj.colloquial_area = geo.colloquial_area
      obj.floor = geo.floor
      obj.room = geo.room
     end
    end
    after_validation :reverse_geocode

But I get this error:

    NoMethodError in StoresController#create
    
    undefined method `route' for #<Geocoder::Result::Google:0x6939150>

If I remove it this object it just goes to the next one, such as `intersection`.

What is the issue here?


  [1]: https://github.com/alexreisner/geocoder
  [2]: https://github.com/alexreisner/geocoder#advanced-geocoding
  [3]: https://developers.google.com/maps/documentation/geocoding/#JSON