Class: Graticule::Geocoder::LocalSearchMaps
- Defined in:
- lib/graticule/geocoder/local_search_maps.rb
Overview
A library for lookup of coordinates with geo.localsearchmaps.com/
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
-
#initialize ⇒ LocalSearchMaps
constructor
A new instance of LocalSearchMaps.
-
#locate(params) ⇒ Object
This web service will handle some addresses outside the US if given more structured arguments than just a string address So allow input as a hash for the different arguments (:city, :country, :zip).
Constructor Details
#initialize ⇒ LocalSearchMaps
Returns a new instance of LocalSearchMaps.
10 11 12 |
# File 'lib/graticule/geocoder/local_search_maps.rb', line 10 def initialize @url = URI.parse 'http://geo.localsearchmaps.com/' end |
Instance Method Details
#locate(params) ⇒ Object
This web service will handle some addresses outside the US if given more structured arguments than just a string address So allow input as a hash for the different arguments (:city, :country, :zip)
17 18 19 |
# File 'lib/graticule/geocoder/local_search_maps.rb', line 17 def locate(params) get params.is_a?(String) ? {:loc => params} : map_attributes(location_from_params(params)) end |