Class: Graticule::Geocoder::Mapbox

Inherits:
Base
  • Object
show all
Defined in:
lib/graticule/geocoder/mapbox.rb

Defined Under Namespace

Classes: Result

Constant Summary collapse

BASE_URL =
"http://api.tiles.mapbox.com"

Constants inherited from Base

Base::USER_AGENT

Instance Method Summary collapse

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