lib/geocoder/results/amazon_location_service.rb in geocoder-1.8.2 vs lib/geocoder/results/amazon_location_service.rb in geocoder-1.8.3
- old
+ new
@@ -1,11 +1,12 @@
require 'geocoder/results/base'
module Geocoder::Result
class AmazonLocationService < Base
def initialize(result)
- @place = result
+ @place = result.place
+ super
end
def coordinates
[@place.geometry.point[1], @place.geometry.point[0]]
end
@@ -50,8 +51,12 @@
@place.country
end
def country_code
@place.country
+ end
+
+ def place_id
+ data.place_id if data.respond_to?(:place_id)
end
end
end