From d3812ebebece2c8314190ef9611a2f8bac811244 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 28 Jun 2025 14:34:17 +0000 Subject: [PATCH 1/2] Bugfix on truck routing --- routing/js/valhalla.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/routing/js/valhalla.js b/routing/js/valhalla.js index 394e995..bb7f953 100644 --- a/routing/js/valhalla.js +++ b/routing/js/valhalla.js @@ -975,6 +975,7 @@ app.controller('RouteController', function($scope, $rootScope, $sce, $http) { truckBtn.addEventListener('click', function(e) { if (!rr) return; getToken(); + var costing = 'truck'; if (document.getElementById('truckoptions').style.display == "block") { var truckoptions = setTruckOptions(); var calendarInput = document.getElementById("datepicker").value; @@ -982,19 +983,19 @@ app.controller('RouteController', function($scope, $rootScope, $sce, $http) { dateStr = datetimeUpdate(calendarInput); var dtoptions = setDateTime(dateStr); rr.route({ - costing : 'truck', + costing : costing, costing_options : truckoptions, date_time : dtoptions }); } else { rr.route({ - costing : 'truck', + costing : costing, costing_options : truckoptions, }); } } else { rr.route({ - costing : 'truck' + costing : costing }); } updateHashCosting(costing,truckoptions,dtoptions); From 2be3abac3926bc96489850de3763de30afb98873 Mon Sep 17 00:00:00 2001 From: mmannes Date: Sat, 28 Jun 2025 14:52:22 -0300 Subject: [PATCH 2/2] Update valhalla.js Fixed indentation --- routing/js/valhalla.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routing/js/valhalla.js b/routing/js/valhalla.js index bb7f953..d4c22b7 100644 --- a/routing/js/valhalla.js +++ b/routing/js/valhalla.js @@ -975,7 +975,7 @@ app.controller('RouteController', function($scope, $rootScope, $sce, $http) { truckBtn.addEventListener('click', function(e) { if (!rr) return; getToken(); - var costing = 'truck'; + var costing = 'truck'; if (document.getElementById('truckoptions').style.display == "block") { var truckoptions = setTruckOptions(); var calendarInput = document.getElementById("datepicker").value;