DennisOSRM/Project-OSRM — Issue #109: JSON not adding temporal segment duration to response
Author: Delawen
Created: 2012-02-06 16:44:48+00:00
State: open

Here is a simple patch to solve this:

From 69b5f91d0cdafb8ac9ceb286c36263c90a76e39d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mar=C3=ADa=20Arias=20de=20Reyna=20Dom=C3=ADnguez?=
Date: Mon, 6 Feb 2012 17:40:38 +0100
Subject: [PATCH] bug fixed: The temporal distance was not being added to the json response.

---
Descriptors/JSONDescriptor.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Descriptors/JSONDescriptor.h b/Descriptors/JSONDescriptor.h
index 4fe3710..a4ae4ab 100644
--- a/Descriptors/JSONDescriptor.h
+++ b/Descriptors/JSONDescriptor.h
@@ -135,6 +135,7 @@ public:
reply.content += tmpLength;
reply.content += ",";
intToString(segment.duration, tmp);
+ reply.content += tmp;
reply.content += ",\"";
reply.content += tmpLength;
//TODO: fix heading
--
1.7.1