Merge pull request #6067 from darina/routing-start-mode-fix

On devices without compass start routing in follow-and-rotate mode.
This commit is contained in:
Roman Kuznetsov 2017-05-16 14:41:24 +03:00 committed by GitHub
commit aa6703383e

View file

@ -809,16 +809,10 @@ void MyPositionController::ActivateRouting(int zoomLevel, bool enableAutoZoom)
m_routingNotFollowTimer.Reset();
m_enableAutoZoomInRouting = enableAutoZoom;
if (IsRotationAvailable())
{
ChangeMode(location::FollowAndRotate);
ChangeModelView(m_position, m_drawDirection, GetRoutingRotationPixelCenter(), zoomLevel);
}
else
{
ChangeMode(location::Follow);
ChangeModelView(m_position, zoomLevel);
}
ChangeMode(location::FollowAndRotate);
ChangeModelView(m_position, m_isDirectionAssigned ? m_drawDirection : 0.0,
GetRoutingRotationPixelCenter(), zoomLevel);
}
}