Print cost in search result
This commit is contained in:
parent
e01245cb98
commit
6ffee116c7
@ -315,9 +315,9 @@ int dijkstra_search_route_to_geojson(struct dijkstra_search *search,
|
|||||||
sdprintf(buf, &offset, " \"properties\": {\n"
|
sdprintf(buf, &offset, " \"properties\": {\n"
|
||||||
" \"heading\": \"%f\",\n"
|
" \"heading\": \"%f\",\n"
|
||||||
" \"through\": \"%s\",\n"
|
" \"through\": \"%s\",\n"
|
||||||
|
" \"cost\": \"%d\",\n"
|
||||||
" \"type\": \"%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, " \"description\": \"");
|
||||||
sdprintf(buf, &offset, format_str, relative_direction_str, search->states[node->uid]->cheapest_path->name);
|
sdprintf(buf, &offset, format_str, relative_direction_str, search->states[node->uid]->cheapest_path->name);
|
||||||
sdprintf(buf, &offset, "\"\n");
|
sdprintf(buf, &offset, "\"\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user