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
path: root/map
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2015-08-07 19:48:55 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:00:03 +0300
commit96fd81f9e05f09af3115ff1a0413f15839ca725b (patch)
treefd520d8b3f43e24648700472a379adda34642739 /map
parent6302ca385de26b612a350d3b6868314760bbaa70 (diff)
[routing] Set initial scale to 15 for pedestrian routing.
Diffstat (limited to 'map')
-rw-r--r--map/framework.cpp9
-rw-r--r--map/framework.hpp2
-rw-r--r--map/location_state.cpp5
-rw-r--r--map/location_state.hpp2
4 files changed, 13 insertions, 5 deletions
diff --git a/map/framework.cpp b/map/framework.cpp
index caedf287ef..d00a2a45e2 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -2226,6 +2226,15 @@ void Framework::RemoveRoute()
m_bmManager.ResetRouteTrack();
}
+void Framework::FollowRoute()
+{
+ int const scale = (m_currentRouterType == RouterType::Pedestrian) ?
+ scales::GetUpperComfortScale() :
+ scales::GetNavigationScale();
+
+ GetLocationState()->StartRouteFollow(scale);
+}
+
void Framework::CloseRouting()
{
ASSERT_THREAD_CHECKER(m_threadChecker, ("CloseRouting"));
diff --git a/map/framework.hpp b/map/framework.hpp
index e67f8b8e76..1c7934a02b 100644
--- a/map/framework.hpp
+++ b/map/framework.hpp
@@ -573,7 +573,7 @@ public:
void BuildRoute(m2::PointD const & destination, uint32_t timeoutSec);
void SetRouteBuildingListener(TRouteBuildingCallback const & buildingCallback) { m_routingCallback = buildingCallback; }
void SetRouteProgressListener(TRouteProgressCallback const & progressCallback) { m_progressCallback = progressCallback; }
- void FollowRoute() { GetLocationState()->StartRouteFollow(); }
+ void FollowRoute();
void CloseRouting();
void GetRouteFollowingInfo(location::FollowingInfo & info) { m_routingSession.GetRouteFollowingInfo(info); }
m2::PointD GetRouteEndPoint() const { return m_routingSession.GetEndPoint(); }
diff --git a/map/location_state.cpp b/map/location_state.cpp
index e5d690fb9d..f56528fcf3 100644
--- a/map/location_state.cpp
+++ b/map/location_state.cpp
@@ -366,14 +366,13 @@ void State::RouteBuilded()
}
}
-void State::StartRouteFollow()
+void State::StartRouteFollow(int scale)
{
ASSERT(IsInRouting(), ());
ASSERT(IsModeHasPosition(), ());
m2::PointD const size(m_errorRadius, m_errorRadius);
- m_framework->ShowRectExVisibleScale(m2::RectD(m_position - size, m_position + size),
- scales::GetNavigationScale());
+ m_framework->ShowRectExVisibleScale(m2::RectD(m_position - size, m_position + size), scale);
SetModeInfo(ChangeMode(m_modeInfo, NotFollow));
SetModeInfo(ChangeMode(m_modeInfo, IsRotationActive() ? RotateAndFollow : Follow));
diff --git a/map/location_state.hpp b/map/location_state.hpp
index b85fca74b6..3f88095b91 100644
--- a/map/location_state.hpp
+++ b/map/location_state.hpp
@@ -69,7 +69,7 @@ namespace location
void SwitchToNextMode();
void RouteBuilded();
- void StartRouteFollow();
+ void StartRouteFollow(int scale);
void StopRoutingMode();
int AddStateModeListener(TStateModeListener const & l);