diff --git a/lib/geocoder/results/nominatim.rb b/lib/geocoder/results/nominatim.rb index 1cf92ec820de25271795e02abc96ef8c07cfcf4b..d60005bd89db9d0bd90254d5ddffc79bf254cf02 100644 --- a/lib/geocoder/results/nominatim.rb +++ b/lib/geocoder/results/nominatim.rb @@ -4,9 +4,7 @@ module Geocoder::Result class Nominatim < Base def poi - %w[building university school hospital mall hotel restaurant stadium bus_stop tram_stop].each do |key| - return @data['address'][key] if @data['address'].key?(key) - end + return @data['address'][place_type] if @data['address'].key?(place_type) return nil end