Class: Geocoder::Result::AmazonLocationService
- Defined in:
- lib/geocoder/results/amazon_location_service.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #address ⇒ Object
- #city ⇒ Object
- #coordinates ⇒ Object
- #country ⇒ Object
- #country_code ⇒ Object
-
#initialize(result) ⇒ AmazonLocationService
constructor
A new instance of AmazonLocationService.
- #neighborhood ⇒ Object
- #postal_code ⇒ Object
- #province ⇒ Object
- #province_code ⇒ Object
- #route ⇒ Object
- #state ⇒ Object
- #state_code ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(result) ⇒ AmazonLocationService
Returns a new instance of AmazonLocationService.
5 6 7 |
# File 'lib/geocoder/results/amazon_location_service.rb', line 5 def initialize(result) @place = result end |
Instance Method Details
#address ⇒ Object
13 14 15 |
# File 'lib/geocoder/results/amazon_location_service.rb', line 13 def address @place.label end |
#city ⇒ Object
25 26 27 |
# File 'lib/geocoder/results/amazon_location_service.rb', line 25 def city @place.municipality || @place.sub_region end |
#coordinates ⇒ Object
9 10 11 |
# File 'lib/geocoder/results/amazon_location_service.rb', line 9 def coordinates [@place.geometry.point[1], @place.geometry.point[0]] end |
#country ⇒ Object
49 50 51 |
# File 'lib/geocoder/results/amazon_location_service.rb', line 49 def country @place.country end |
#country_code ⇒ Object
53 54 55 |
# File 'lib/geocoder/results/amazon_location_service.rb', line 53 def country_code @place.country end |
#neighborhood ⇒ Object
17 18 19 |
# File 'lib/geocoder/results/amazon_location_service.rb', line 17 def neighborhood @place.neighborhood end |
#postal_code ⇒ Object
45 46 47 |
# File 'lib/geocoder/results/amazon_location_service.rb', line 45 def postal_code @place.postal_code end |
#province ⇒ Object
37 38 39 |
# File 'lib/geocoder/results/amazon_location_service.rb', line 37 def province @place.region end |
#province_code ⇒ Object
41 42 43 |
# File 'lib/geocoder/results/amazon_location_service.rb', line 41 def province_code @place.region end |
#route ⇒ Object
21 22 23 |
# File 'lib/geocoder/results/amazon_location_service.rb', line 21 def route @place.street end |
#state ⇒ Object
29 30 31 |
# File 'lib/geocoder/results/amazon_location_service.rb', line 29 def state @place.region end |
#state_code ⇒ Object
33 34 35 |
# File 'lib/geocoder/results/amazon_location_service.rb', line 33 def state_code @place.region end |