Class: Yahoo::Geocode::Location
- Inherits:
-
Struct
- Object
- Struct
- Yahoo::Geocode::Location
- Defined in:
- lib/yahoo/geocode.rb,
lib/yahoo/geocode.rb
Overview
A Location contains the following fields:
latitude
-
Latitude of the location
longitude
-
Longitude of the location
address
-
Street address of the result, if a specific location could be determined
city
-
City in which the result is located
state
-
State in which the result is located
zip
-
Zip code, if known
country
-
Country in which the result is located
precision
-
The precision of the address used for geocoding
warning
-
If the exact address was not found, the closest available match
Precision can be one of the following, from most specific to most general:
-
address
-
street
-
zip+4
-
zip+2
-
zip
-
city
-
state
-
country
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#city ⇒ Object
Returns the value of attribute city.
-
#country ⇒ Object
Returns the value of attribute country.
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
-
#precision ⇒ Object
Returns the value of attribute precision.
-
#state ⇒ Object
Returns the value of attribute state.
-
#warning ⇒ Object
Returns the value of attribute warning.
-
#zip ⇒ Object
Returns the value of attribute zip.
Instance Method Summary collapse
-
#coordinates ⇒ Object
Returns an Array with latitude and longitude.
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address
16 17 18 |
# File 'lib/yahoo/geocode.rb', line 16 def address @address end |
#city ⇒ Object
Returns the value of attribute city
16 17 18 |
# File 'lib/yahoo/geocode.rb', line 16 def city @city end |
#country ⇒ Object
Returns the value of attribute country
16 17 18 |
# File 'lib/yahoo/geocode.rb', line 16 def country @country end |
#latitude ⇒ Object
Returns the value of attribute latitude
16 17 18 |
# File 'lib/yahoo/geocode.rb', line 16 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude
16 17 18 |
# File 'lib/yahoo/geocode.rb', line 16 def longitude @longitude end |
#precision ⇒ Object
Returns the value of attribute precision
16 17 18 |
# File 'lib/yahoo/geocode.rb', line 16 def precision @precision end |
#state ⇒ Object
Returns the value of attribute state
16 17 18 |
# File 'lib/yahoo/geocode.rb', line 16 def state @state end |
#warning ⇒ Object
Returns the value of attribute warning
16 17 18 |
# File 'lib/yahoo/geocode.rb', line 16 def warning @warning end |
#zip ⇒ Object
Returns the value of attribute zip
16 17 18 |
# File 'lib/yahoo/geocode.rb', line 16 def zip @zip end |
Instance Method Details
#coordinates ⇒ Object
Returns an Array with latitude and longitude.
100 101 102 |
# File 'lib/yahoo/geocode.rb', line 100 def coordinates [latitude, longitude] end |