From 581ac66a5b31c910ce6038a2b5c57036e4053fe5 Mon Sep 17 00:00:00 2001 From: Ricky Brundritt Date: Tue, 27 Jun 2023 05:58:49 -0700 Subject: [PATCH] Update TruckDistanceMatrixGenerator.cs Fix bug - First cell of truck-based distance matrix was calculating incorrect time for minutes. Needed to divide but was multiplying. --- Source/Internal/TruckDistanceMatrixGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Internal/TruckDistanceMatrixGenerator.cs b/Source/Internal/TruckDistanceMatrixGenerator.cs index 1669a54..c1a3300 100644 --- a/Source/Internal/TruckDistanceMatrixGenerator.cs +++ b/Source/Internal/TruckDistanceMatrixGenerator.cs @@ -110,7 +110,7 @@ namespace BingMapsRESTToolkit.Extensions DestinationIndex = 0, HasError = false, TravelDistance = truckRoute.TravelDistance, - TravelDuration = (request.TimeUnits == TimeUnitType.Minute) ? truckRoute.TravelDuration * 60 : truckRoute.TravelDuration + TravelDuration = (request.TimeUnits == TimeUnitType.Minute) ? truckRoute.TravelDuration / 60 : truckRoute.TravelDuration }); var cellTasks = new List();