MCPcopy Create free account
hub / github.com/comaps/comaps / CheckLocationForRouting

Method CheckLocationForRouting

libs/map/routing_manager.cpp:1237–1250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1235}
1236
1237void RoutingManager::CheckLocationForRouting(location::GpsInfo const & info)
1238{
1239 if (!IsRoutingActive())
1240 return;
1241
1242 SessionState const state = m_routingSession.OnLocationPositionChanged(info);
1243 if (state == SessionState::RouteNeedsRebuild)
1244 {
1245 m_routingSession.RebuildRoute(
1246 mercator::FromLatLon(info.m_latitude, info.m_longitude), [this](Route const & route, RouterResultCode code)
1247 { OnRebuildRouteReady(route, code); }, nullptr /* needMoreMapsCallback */, nullptr /* removeRouteCallback */,
1248 RouterDelegate::kNoTimeout, SessionState::RouteRebuilding, true /* adjustToPrevRoute */);
1249 }
1250}
1251
1252void RoutingManager::CallRouteBuilded(RouterResultCode code, storage::CountriesSet const & absentCountries)
1253{

Callers

nothing calls this directly

Calls 3

RebuildRouteMethod · 0.80
FromLatLonFunction · 0.50

Tested by

no test coverage detected