diff --git a/lib/geocoder/results/nominatim.rb b/lib/geocoder/results/nominatim.rb index a56bae86820e17c81dfd2449e37f14f63d609edb..05e51805a9388045613bbc07f4fd7d0da860be8f 100644 --- a/lib/geocoder/results/nominatim.rb +++ b/lib/geocoder/results/nominatim.rb @@ -61,13 +61,17 @@ module Geocoder::Result @data['address']['country_code'] end + def suburb + @data['address']['suburb'] + end + def coordinates [@data['lat'].to_f, @data['lon'].to_f] end def self.response_attributes - %w[place_id osm_type osm_id boundingbox license - polygonpoints display_name class type stadium suburb] + %w[place_id osm_type osm_id boundingbox license + polygonpoints display_name class type stadium] end response_attributes.each do |a|