Only allow to start a route on streets

This commit is contained in:
Markus Koch 2021-02-08 21:38:21 +01:00
parent d24904c2d0
commit 8f9d5c254a

View File

@ -548,6 +548,8 @@ struct dijkstra_node *dijkstra_node_find_closest_node(struct dijkstra_solver *so
for (l = solver->nodes; l != NULL; l = l->next) {
node = (struct dijkstra_node*) l->data;
if (node->layer->type != STREET)
continue;
distance = dijkstra_position_get_distance(position, &node->position);
if (!closest_node || distance < closest_distance) {
closest_node = node;