From ee6edf03f8da4015080261f3244144293e56ad11 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 27 Apr 2018 12:38:09 +0200 Subject: TomTom::Matrix: Disable traffic information By default the TomTom API uses traffic data to calculate travel time. This means that previously, getting costs for the exact same route twice at different times could produce different results. Johan made a good suggestion to turn off this functionality as it's apparently enabled by default. This should get us correct times regardless of time of day since the distances will be effectively the same. Refs #6661 --- lib/tom_tom/matrix.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/tom_tom/matrix.rb b/lib/tom_tom/matrix.rb index b0c8cc335..c418cd516 100644 --- a/lib/tom_tom/matrix.rb +++ b/lib/tom_tom/matrix.rb @@ -15,6 +15,7 @@ module TomTom req.headers['Content-Type'] = 'application/json' req.params[:routeType] = 'shortest' + req.params[:traffic] = 'false' req.params[:travelMode] = 'bus' req.body = build_request_body(points) -- cgit v1.2.3