Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorExMix <rahuba.youri@mapswithme.com>2014-10-03 22:52:11 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:29:21 +0300
commit04bd479bd66a95883ac906b1f745d19bde567b8d (patch)
tree88818b31acd080219a52bad74f82bd136b7bf23f /map/location_state.cpp
parent75b67819baa9c666ca0657c76a7cc1d35dad4d69 (diff)
[core, android] button "go" and core support for it
Diffstat (limited to 'map/location_state.cpp')
-rw-r--r--map/location_state.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/map/location_state.cpp b/map/location_state.cpp
index 0867231c2c..8dd978d63d 100644
--- a/map/location_state.cpp
+++ b/map/location_state.cpp
@@ -278,12 +278,24 @@ void State::SwitchToNextMode()
SetModeInfo(ChangeMode(m_modeInfo, newMode));
}
-void State::StartRoutingMode()
+void State::RouteBuilded()
{
ASSERT(GetPlatform().HasRouting(), ());
ASSERT(IsModeHasPosition(), ());
- State::Mode newMode = IsRotationActive() ? RotateAndFollow : Follow;
- SetModeInfo(ChangeMode(IncludeModeBit(m_modeInfo, RoutingSessionBit), newMode));
+ StopAllAnimations();
+ SetModeInfo(ChangeMode(IncludeModeBit(m_modeInfo, RoutingSessionBit), NotFollow));
+}
+
+void State::StartRouteFollow()
+{
+ ASSERT(TestModeBit(m_modeInfo, RoutingSessionBit), ());
+ ASSERT(GetPlatform().HasRouting(), ());
+ ASSERT(IsModeHasPosition(), ());
+ m2::PointD const size(m_errorRadius, m_errorRadius);
+ m_framework->ShowRectExVisibleScale(m2::RectD(m_position - size, m_position + size),
+ scales::GetUpperComfortScale());
+
+ SetModeInfo(ChangeMode(m_modeInfo, IsRotationActive() ? RotateAndFollow : Follow));
}
void State::StopRoutingMode()