From 6ffee116c7a651205c1699a96e354f48f8b0a699 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Sat, 13 Mar 2021 13:07:33 +0100 Subject: [PATCH] Print cost in search result --- src/dijkstrasearch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dijkstrasearch.c b/src/dijkstrasearch.c index fa682c4..322e8b9 100644 --- a/src/dijkstrasearch.c +++ b/src/dijkstrasearch.c @@ -315,9 +315,9 @@ int dijkstra_search_route_to_geojson(struct dijkstra_search *search, sdprintf(buf, &offset, " \"properties\": {\n" " \"heading\": \"%f\",\n" " \"through\": \"%s\",\n" + " \"cost\": \"%d\",\n" " \"type\": \"%d\",\n", - heading, path_to_next->name, path_to_next->net_meta->type); - + heading, path_to_next->name, search->states[node->uid]->cost, path_to_next->net_meta->type); sdprintf(buf, &offset, " \"description\": \""); sdprintf(buf, &offset, format_str, relative_direction_str, search->states[node->uid]->cheapest_path->name); sdprintf(buf, &offset, "\"\n");