Class: Graticule::Geocoder::GeocoderCa
- Defined in:
- lib/graticule/geocoder/geocoder_ca.rb
Overview
TODO: Reverse Geocoding
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
-
#initialize(auth = nil) ⇒ GeocoderCa
constructor
A new instance of GeocoderCa.
- #locate(address) ⇒ Object
Constructor Details
#initialize(auth = nil) ⇒ GeocoderCa
Returns a new instance of GeocoderCa.
7 8 9 10 |
# File 'lib/graticule/geocoder/geocoder_ca.rb', line 7 def initialize(auth = nil) @url = URI.parse 'http://geocoder.ca/' @auth = auth end |
Instance Method Details
#locate(address) ⇒ Object
12 13 14 |
# File 'lib/graticule/geocoder/geocoder_ca.rb', line 12 def locate(address) get :locate => address.is_a?(String) ? address : location_from_params(address).to_s(:country => false) end |