Class: Graticule::Geocoder::Mapbox
- Defined in:
- lib/graticule/geocoder/mapbox.rb
Defined Under Namespace
Classes: Result
Constant Summary collapse
- BASE_URL =
"http://api.mapbox.com/geocoding/v5/mapbox.places"
Constants inherited from Base
Instance Method Summary collapse
-
#initialize(api_key) ⇒ Mapbox
constructor
A new instance of Mapbox.
- #locate(address) ⇒ Object
Constructor Details
#initialize(api_key) ⇒ Mapbox
Returns a new instance of Mapbox.
6 7 8 |
# File 'lib/graticule/geocoder/mapbox.rb', line 6 def initialize(api_key) @api_key = api_key end |
Instance Method Details
#locate(address) ⇒ Object
10 11 12 |
# File 'lib/graticule/geocoder/mapbox.rb', line 10 def locate(address) get :q => address end |