Class: Routing::Adapter::Navteq
- Inherits:
-
Object
- Object
- Routing::Adapter::Navteq
- Defined in:
- lib/routing/adapter/navteq.rb
Overview
Instance Method Summary collapse
- #calculate(geo_points) ⇒ Object
-
#initialize(options = {}) ⇒ Navteq
constructor
A new instance of Navteq.
Constructor Details
#initialize(options = {}) ⇒ Navteq
Returns a new instance of Navteq.
12 13 14 15 16 17 |
# File 'lib/routing/adapter/navteq.rb', line 12 def initialize( = {}) = { :service_path => '/routing/6.2/calculateroute.json', :parser => ::Routing::Parser::NavteqSimple }.merge() end |
Instance Method Details
#calculate(geo_points) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/routing/adapter/navteq.rb', line 19 def calculate(geo_points) response = connection.get do |request| request.url([:service_path]) request.params = default_params.merge(geo_points_to_params(geo_points)) end parse(response.body) end |