diff --git a/libs/map/framework.cpp b/libs/map/framework.cpp index ba683261f..50bf6a34f 100644 --- a/libs/map/framework.cpp +++ b/libs/map/framework.cpp @@ -2424,6 +2424,10 @@ void Framework::Allow3dMode(bool allow3d, bool allow3dBuildings) if (!m_powerManager.IsFacilityEnabled(power_management::Facility::Buildings3d)) allow3dBuildings = false; + /// If we are in CarPlay/AA mode and Navigation is active, force 3D buildings off. + if (m_isCarScreenMode && m_routingManager.IsRoutingActive()) + allow3dBuildings = false; + m_drapeEngine->Allow3dMode(allow3d, allow3dBuildings); } @@ -3224,6 +3228,10 @@ void Framework::OnRouteFollow(routing::RouterType type) // GetRoutingSettings(type).m_matchRoute to the FollowRoute() instead of |isPedestrianRoute|. // |isArrowGlued| parameter fully corresponds to |m_matchRoute| in RoutingSettings. m_drapeEngine->FollowRoute(scale, scale3d, enableAutoZoom, !isPedestrianRoute /* isArrowGlued */); + + bool allow3d, allow3dBuildings; + Load3dMode(allow3d, allow3dBuildings); + Allow3dMode(allow3d, allow3dBuildings); } // RoutingManager::Delegate @@ -3292,3 +3300,15 @@ void Framework::OnPowerSchemeChanged(power_management::Scheme const actualScheme if (actualScheme == power_management::Scheme::EconomyMaximum && GetTrafficManager().IsEnabled()) GetTrafficManager().SetEnabled(false); } + +void Framework::SetCarScreenMode(bool enabled) +{ + if (m_isCarScreenMode == enabled) + return; + + m_isCarScreenMode = enabled; + + bool allow3d, allow3dBuildings; + Load3dMode(allow3d, allow3dBuildings); + Allow3dMode(allow3d, allow3dBuildings); +} diff --git a/libs/map/framework.hpp b/libs/map/framework.hpp index 8abb43cbd..9be575566 100644 --- a/libs/map/framework.hpp +++ b/libs/map/framework.hpp @@ -769,4 +769,9 @@ public: // PowerManager::Subscriber override. void OnPowerFacilityChanged(power_management::Facility const facility, bool enabled) override; void OnPowerSchemeChanged(power_management::Scheme const actualScheme) override; + +public: + /// Call this from iOS/Android when CarPlay/AA session starts/ends + void SetCarScreenMode(bool enabled); + bool m_isCarScreenMode = false; };