From 4e99e7b9fc17d0a527c8598e22912046bf612869 Mon Sep 17 00:00:00 2001 From: Arsentiy Milchakov Date: Thu, 6 Oct 2016 22:03:40 +0300 Subject: RouterType::Uber is added --- map/framework.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'map') diff --git a/map/framework.cpp b/map/framework.cpp index 5d81b5f256..3f64d250b3 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -2379,7 +2379,8 @@ void Framework::InsertRoute(Route const & route) } vector turns; - if (m_currentRouterType == RouterType::Vehicle || m_currentRouterType == RouterType::Bicycle) + if (m_currentRouterType == RouterType::Vehicle || m_currentRouterType == RouterType::Bicycle || + m_currentRouterType == RouterType::Uber) route.GetTurnsDistances(turns); df::ColorConstant routeColor = df::Route; @@ -2481,6 +2482,7 @@ RouterType Framework::GetBestRouter(m2::PointD const & startPoint, m2::PointD co case RouterType::Bicycle: return lastUsedRouter; case RouterType::Vehicle: + case RouterType::Uber: ; // fall through } @@ -2557,8 +2559,9 @@ bool Framework::LoadAutoZoom() void Framework::AllowAutoZoom(bool allowAutoZoom) { bool const isPedestrianRoute = m_currentRouterType == RouterType::Pedestrian; + bool const isUberRoute = m_currentRouterType == RouterType::Uber; - CallDrapeFunction(bind(&df::DrapeEngine::AllowAutoZoom, _1, allowAutoZoom && !isPedestrianRoute)); + CallDrapeFunction(bind(&df::DrapeEngine::AllowAutoZoom, _1, allowAutoZoom && !isPedestrianRoute && !isUberRoute)); } void Framework::SaveAutoZoom(bool allowAutoZoom) -- cgit v1.2.3