RoutingManager::Delegate
| 3270 | |
| 3271 | // RoutingManager::Delegate |
| 3272 | void 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 |
| 3295 | void Framework::RegisterCountryFilesOnRoute(shared_ptr<routing::NumMwmIds> ptr) const |
no test coverage detected