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

Method OnRouteFollow

libs/map/framework.cpp:3272–3292  ·  view source on GitHub ↗

RoutingManager::Delegate

Source from the content-addressed store, hash-verified

3270
3271// RoutingManager::Delegate
3272void Framework::OnRouteFollow(routing::RouterType type)
3273{
3274 bool const isPedestrianRoute = type == RouterType::Pedestrian;
3275 bool const enableAutoZoom = isPedestrianRoute ? false : LoadAutoZoom();
3276 int const scale = isPedestrianRoute ? scales::GetPedestrianNavigationScale() : scales::GetNavigationScale();
3277 int scale3d = isPedestrianRoute ? scales::GetPedestrianNavigation3dScale() : scales::GetNavigation3dScale();
3278 if (enableAutoZoom)
3279 ++scale3d;
3280
3281 bool const isBicycleRoute = type == RouterType::Bicycle;
3282 if ((isPedestrianRoute || isBicycleRoute) && LoadTrafficEnabled())
3283 {
3284 m_trafficManager.SetEnabled(false /* enabled */);
3285 SaveTrafficEnabled(false /* enabled */);
3286 }
3287 // TODO. We need to sync two enums VehicleType and RouterType to be able to pass
3288 // GetRoutingSettings(type).m_matchRoute to the FollowRoute() instead of |isPedestrianRoute|.
3289 // |isArrowGlued| parameter fully corresponds to |m_matchRoute| in RoutingSettings.
3290 m_drapeEngine->FollowRoute(scale, scale3d, enableAutoZoom, !isPedestrianRoute /* isArrowGlued */);
3291 Refresh3dMode();
3292}
3293
3294// RoutingManager::Delegate
3295void Framework::RegisterCountryFilesOnRoute(shared_ptr<routing::NumMwmIds> ptr) const

Callers 1

FollowRouteMethod · 0.80

Calls 6

GetNavigationScaleFunction · 0.85
GetNavigation3dScaleFunction · 0.85
SetEnabledMethod · 0.45
FollowRouteMethod · 0.45

Tested by

no test coverage detected