forked from organicmaps/organicmaps
Removing a directions in case if there are only one way to leave the direction.
This commit is contained in:
parent
e18ff734cf
commit
1c21b831ef
1 changed files with 5 additions and 2 deletions
|
@ -850,10 +850,9 @@ void OsrmRouter::GetTurnDirection(PathData const & node1,
|
|||
while (a < 0)
|
||||
a += 360;
|
||||
|
||||
#ifdef _DEBUG
|
||||
TurnCandidatesT nodes;
|
||||
GetPossibleTurns(node1.node, p1, p, mwmId, nodes);
|
||||
|
||||
#ifdef _DEBUG
|
||||
LOG(LDEBUG, ("Possible turns: ", nodes.size()));
|
||||
for (size_t i = 0; i < nodes.size(); ++i)
|
||||
{
|
||||
|
@ -863,6 +862,10 @@ void OsrmRouter::GetTurnDirection(PathData const & node1,
|
|||
#endif
|
||||
|
||||
turn.m_turn = turns::NoTurn;
|
||||
|
||||
if (nodes.size() < 2)
|
||||
return;
|
||||
|
||||
if (a >= 23 && a < 67)
|
||||
turn.m_turn = turns::TurnSharpRight;
|
||||
else if (a >= 67 && a < 130)
|
||||
|
|
Loading…
Add table
Reference in a new issue