Adds turn instructions to the turns layer in debug tiles. (#4460)

Add turn types and modifiers to turn points in debug tiles.  Also refactor some of the tile code to reduce some repetition.
This commit is contained in:
Daniel Patterson
2017-09-01 15:08:22 -07:00
committed by GitHub
parent 89cf6d9e74
commit 0fc1aa2711
9 changed files with 270 additions and 150 deletions
+7 -2
View File
@@ -183,6 +183,7 @@ std::vector<TurnData> generateTurns(const datafacade &facade,
// treat the whole lot as the "turn cost" that we'll stick on the map.
const auto turn_weight = data.weight - sum_node_weight;
const auto turn_duration = data.duration - sum_node_duration;
const auto turn_instruction = facade.GetTurnInstructionForEdgeID(data.turn_id);
// Find the three nodes that make up the turn movement)
const auto node_from = startnode;
@@ -214,8 +215,12 @@ std::vector<TurnData> generateTurns(const datafacade &facade,
// Save everything we need to later add all the points to the tile.
// We need the coordinate of the intersection, the angle in, the turn
// angle and the turn cost.
all_turn_data.push_back(
TurnData{coord_via, angle_in, turn_angle, turn_weight, turn_duration});
all_turn_data.push_back(TurnData{coord_via,
angle_in,
turn_angle,
turn_weight,
turn_duration,
turn_instruction});
}
}
}