From 7976081f0da4bb614a6b3e8a19c62d766a4d143e Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Fri, 12 May 2017 16:32:22 +0300 Subject: [PATCH] [routing] Route calculation on world graph in case of start and finish leaps. --- routing/index_router.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/routing/index_router.cpp b/routing/index_router.cpp index 3a7c7fa3aa..95f1f1235c 100644 --- a/routing/index_router.cpp +++ b/routing/index_router.cpp @@ -316,6 +316,13 @@ IRouter::ResultCode IndexRouter::ProcessLeaps(vector const & input, continue; } + // In case of leaps from the start to its mwm transition and from finish mwm transition + // Route calculation should be made on the world graph (WorldGraph::Mode::NoLeaps). + if ((i == 0 || i + 2 == input.size()) && worldRouteMode == WorldGraph::Mode::LeapsOnly) + worldGraph.SetMode(WorldGraph::Mode::NoLeaps); + else + worldGraph.SetMode(WorldGraph::Mode::SingleMwm); + ++i; CHECK_LESS(i, input.size(), ()); Segment const & next = input[i];