diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-08-19 16:46:34 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:01:52 +0300 |
commit | 1eb8dc065b4bc4ad80f821d46ef818cf69651ced (patch) | |
tree | 85b23213a3d695e474363a571facb0fe3712423e /routing | |
parent | 20e99ffe09c774db39278bc961595ca9a116aaee (diff) |
[routing] Cross mwm route instructions concatination fix.
Diffstat (limited to 'routing')
-rw-r--r-- | routing/osrm_router.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/routing/osrm_router.cpp b/routing/osrm_router.cpp index 0b62d1bd9f..f60ca81752 100644 --- a/routing/osrm_router.cpp +++ b/routing/osrm_router.cpp @@ -483,6 +483,14 @@ OsrmRouter::ResultCode OsrmRouter::MakeRouteFromCrossesPath(TCheckedPath const & if (!FindSingleRoute(cross.startNode, cross.finalNode, mwmMapping->m_dataFacade, routingResult)) return OsrmRouter::RouteNotFound; + if (!Points.empty()) + { + // Remove road end point and turn instruction. + Points.pop_back(); + TurnsDir.pop_back(); + Times.pop_back(); + } + // Get annotated route. Route::TTurns mwmTurnsDir; Route::TTimes mwmTimes; @@ -508,11 +516,6 @@ OsrmRouter::ResultCode OsrmRouter::MakeRouteFromCrossesPath(TCheckedPath const & Times.push_back(time); } - if (!Points.empty()) - { - // We're at the end point. - Points.pop_back(); - } Points.insert(Points.end(), mwmPoints.begin(), mwmPoints.end()); } |