Class: Geocoder::Lookup::Mapquest

Inherits:
Base
  • Object
show all
Defined in:
lib/geocoder/lookups/mapquest.rb

Instance Method Summary collapse

Methods inherited from Base

#cache, #handle, #initialize, #map_link_url, #search

Constructor Details

This class inherits a constructor from Geocoder::Lookup::Base

Instance Method Details

#nameObject



8
9
10
# File 'lib/geocoder/lookups/mapquest.rb', line 8

def name
  "Mapquest"
end

#query_url(query) ⇒ Object



16
17
18
19
20
21
# File 'lib/geocoder/lookups/mapquest.rb', line 16

def query_url(query)
  domain = configuration[:open] ? "open" : "www"
  version = configuration[:version] || 1
  url = "#{protocol}://#{domain}.mapquestapi.com/geocoding/v#{version}/#{search_type(query)}?"
  url + url_query_string(query)
end

#required_api_key_partsObject



12
13
14
# File 'lib/geocoder/lookups/mapquest.rb', line 12

def required_api_key_parts
  ["key"]
end