Class: MQProxy
- Inherits:
-
Object
- Object
- MQProxy
- Defined in:
- lib/mqproxy.rb
Overview
Main class for MapQuest API calls
Instance Method Summary collapse
-
#geocode_address(address, options = {}) ⇒ Object
Get directions from one address to the other.
-
#get_route(source, destination, options = {}) ⇒ Object
Get directions from one address to the other.
Instance Method Details
#geocode_address(address, options = {}) ⇒ Object
Get directions from one address to the other
17 18 19 20 21 |
# File 'lib/mqproxy.rb', line 17 def geocode_address(address, = {}) doc = JSON.generate({:location => address, :options => [:mq_options]}) xmlInputString = doc.to_s return MQProxyGeocode.new(send_to_map_quest(xmlInputString, )) end |
#get_route(source, destination, options = {}) ⇒ Object
Get directions from one address to the other
11 12 13 14 |
# File 'lib/mqproxy.rb', line 11 def get_route(source, destination, = {}) addresses = generate_route_json(source,destination, [:mq_options]) return MQProxyRoute.new(route_addresses(addresses,)) end |