Fixed tap on compass in F&R mode

This commit is contained in:
r.kuznetsov 2016-05-06 19:12:23 +03:00 committed by Vladimir Byko-Ianko
parent 1a467a1b97
commit 8852c86585

View file

@ -547,11 +547,14 @@ void MyPositionController::OnCompassTapped()
{
alohalytics::LogEvent("$compassClicked", {{"mode", LocationModeStatisticsName(m_mode)},
{"routing", strings::to_string(IsInRouting())}});
ChangeModelView(0.0);
if (m_mode == location::FollowAndRotate)
{
ChangeMode(location::Follow);
UpdateViewport(kDoNotChangeZoom);
ChangeModelView(m_position, 0.0, m_centerPixelPosition, kDoNotChangeZoom);
}
else
{
ChangeModelView(0.0);
}
}