Sha256: e52797cb65a827e2df0335b96ef0798d922ae9632b7ae8c8d9b6d81288e62cff
Contents?: true
Size: 895 Bytes
Versions: 1
Compression:
Stored size: 895 Bytes
Contents
require 'geocoder/results/base' module Geocoder::Result class AmazonLocationService < Base def initialize(result) @place = result.place super end def coordinates [@place.geometry.point[1], @place.geometry.point[0]] end def address @place.label end def neighborhood @place.neighborhood end def route @place.street end def city @place.municipality || @place.sub_region end def state @place.region end def state_code @place.region end def province @place.region end def province_code @place.region end def postal_code @place.postal_code end def country @place.country end def country_code @place.country end def place_id data.place_id if data.respond_to?(:place_id) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
geocoder-1.8.3 | lib/geocoder/results/amazon_location_service.rb |