Class: Routing::Adapter::Navteq

Inherits:
RestAdapter show all
Defined in:
lib/routing/adapter/navteq.rb

Overview

Adapter for a NAVTEQ LBSP Routing Service v6 server. It passes the GeoPoints to the routing service and will return another Array of GeoPoints, representing the calculated route.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RestAdapter

#calculate, #params

Constructor Details

#initialize(attrs = {}) ⇒ Navteq

Returns a new instance of Navteq.



19
20
21
22
23
# File 'lib/routing/adapter/navteq.rb', line 19

def initialize(attrs = {})
  attrs[:path] ||= '/routing/6.2/calculateroute.json'
  attrs[:parser] ||= ::Routing::Parser::NavteqSimple
  super(attrs)
end

Class Method Details

.default_paramsObject



9
10
11
12
13
14
15
16
17
# File 'lib/routing/adapter/navteq.rb', line 9

def self.default_params
  {
    departure:          Time.now.utc.iso8601,
    mode0:              "fastest;car",
    language:           "de_DE",
    legattributes:      "all,-links",
    maneuverattributes: "position,travelTime,length,time"
  }
end