From 7e729c2ceec5ecc0b245fb709a04013897c39dd7 Mon Sep 17 00:00:00 2001 From: Arsentiy Milchakov Date: Tue, 11 Oct 2016 16:09:41 +0300 Subject: review fixes --- map/framework.cpp | 11 +++++++---- map/framework.hpp | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'map') diff --git a/map/framework.cpp b/map/framework.cpp index daff132424..4f724ff9c3 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -2380,8 +2380,10 @@ void Framework::InsertRoute(Route const & route) vector turns; if (m_currentRouterType == RouterType::Vehicle || m_currentRouterType == RouterType::Bicycle || - m_currentRouterType == RouterType::Uber) + m_currentRouterType == RouterType::Taxi) + { route.GetTurnsDistances(turns); + } df::ColorConstant routeColor = df::Route; df::RoutePattern pattern; @@ -2481,8 +2483,9 @@ RouterType Framework::GetBestRouter(m2::PointD const & startPoint, m2::PointD co case RouterType::Pedestrian: case RouterType::Bicycle: return lastUsedRouter; + case RouterType::Taxi: + ASSERT(false, ("GetLastUsedRouter sould not to return RouterType::Taxi")); case RouterType::Vehicle: - case RouterType::Uber: ; // fall through } @@ -2559,10 +2562,10 @@ bool Framework::LoadAutoZoom() void Framework::AllowAutoZoom(bool allowAutoZoom) { bool const isPedestrianRoute = m_currentRouterType == RouterType::Pedestrian; - bool const isUberRoute = m_currentRouterType == RouterType::Uber; + bool const isTaxiRoute = m_currentRouterType == RouterType::Taxi; CallDrapeFunction(bind(&df::DrapeEngine::AllowAutoZoom, _1, - allowAutoZoom && !isPedestrianRoute && !isUberRoute)); + allowAutoZoom && !isPedestrianRoute && !isTaxiRoute)); } void Framework::SaveAutoZoom(bool allowAutoZoom) diff --git a/map/framework.hpp b/map/framework.hpp index 4ce8263666..961794dd16 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -737,6 +737,9 @@ public: /// GenerateTurnNotifications shall be called by the client when a new position is available. inline void GenerateTurnNotifications(vector & turnNotifications) { + if (m_currentRouterType == routing::RouterType::Taxi) + return; + return m_routingSession.GenerateTurnNotifications(turnNotifications); } -- cgit v1.2.3