diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-07-07 19:49:30 +0300 |
---|---|---|
committer | Aleksandr Zatsepin <alexzatsepin@users.noreply.github.com> | 2017-07-07 20:41:06 +0300 |
commit | 04950a12f754a6d68d2f4fbfa6dd82a6e39278d7 (patch) | |
tree | 128bf58180cdc3eceb8d54557331899c84e5bec4 | |
parent | f20b70f70d553a277729ce8c59b57b3f5386b8b6 (diff) |
-rw-r--r-- | android/src/com/mapswithme/maps/routing/RoutingController.java | 5 | ||||
-rw-r--r-- | iphone/Maps/Core/Routing/MWMRouter.mm | 13 | ||||
-rw-r--r-- | map/routing_manager.cpp | 7 |
3 files changed, 13 insertions, 12 deletions
diff --git a/android/src/com/mapswithme/maps/routing/RoutingController.java b/android/src/com/mapswithme/maps/routing/RoutingController.java index 3557f9ff6c..b3728b841b 100644 --- a/android/src/com/mapswithme/maps/routing/RoutingController.java +++ b/android/src/com/mapswithme/maps/routing/RoutingController.java @@ -289,9 +289,12 @@ public class RoutingController implements TaxiManager.TaxiListener mLastBuildProgress = 0; mInternetConnected = ConnectionState.isConnected(); + // Now only car routing supports intermediate points. + if (!isVehicleRouterType()) + removeIntermediatePoints(); + if (isTaxiRouterType()) { - removeIntermediatePoints(); if (!mInternetConnected) { completeTaxiRequest(); diff --git a/iphone/Maps/Core/Routing/MWMRouter.mm b/iphone/Maps/Core/Routing/MWMRouter.mm index f16890e519..d16c151235 100644 --- a/iphone/Maps/Core/Routing/MWMRouter.mm +++ b/iphone/Maps/Core/Routing/MWMRouter.mm @@ -177,16 +177,9 @@ char const * kRenderAltitudeImagesQueueLabel = "mapsme.mwmrouter.renderAltitudeI { if (type == self.type) return; - if (type == MWMRouterTypeTaxi) - { - auto const routePoints = GetFramework().GetRoutingManager().GetRoutePoints(); - for (auto const & point : routePoints) - { - if (point.m_pointType != RouteMarkType::Intermediate) - continue; - [self removePoint:RouteMarkType::Intermediate intermediateIndex:point.m_intermediateIndex]; - } - } + // Now only car routing supports intermediate points. + if (type != MWMRouterTypeVehicle) + GetFramework().GetRoutingManager().RemoveIntermediateRoutePoints(); [self doStop:NO]; GetFramework().GetRoutingManager().SetRouter(coreRouterType(type)); } diff --git a/map/routing_manager.cpp b/map/routing_manager.cpp index 648b13a1cd..8705940f0c 100644 --- a/map/routing_manager.cpp +++ b/map/routing_manager.cpp @@ -270,7 +270,7 @@ void RoutingManager::SetRouterImpl(routing::RouterType type) m_routingSession.SetRoutingSettings(routing::GetCarRoutingSettings()); } - m_routingSession.SetRouter(move(router), move(fetcher)); + m_routingSession.SetRouter(std::move(router), std::move(fetcher)); m_currentRouterType = type; } @@ -438,6 +438,11 @@ bool RoutingManager::CouldAddIntermediatePoint() const { if (!IsRoutingActive()) return false; + + // Now only car routing supports intermediate points. + if (m_currentRouterType != routing::RouterType::Vehicle) + return false; + UserMarkControllerGuard guard(*m_bmManager, UserMarkType::ROUTING_MARK); return guard.m_controller.GetUserMarkCount() < static_cast<size_t>(RoutePointsLayout::kMaxIntermediatePointsCount + 2); |