Address review comments
Signed-off-by: Jeremiah Miller <jmil@tuta.io>
This commit is contained in:
parent
a9155040a1
commit
73bd65983a
3 changed files with 12 additions and 11 deletions
|
@ -265,7 +265,7 @@ void Framework::OnViewportChanged(ScreenBase const & screen)
|
|||
m_trafficManager.UpdateViewport(m_currentModelView);
|
||||
m_transitManager.UpdateViewport(m_currentModelView);
|
||||
m_isolinesManager.UpdateViewport(m_currentModelView);
|
||||
m_routingManager.SetIsLandscape(m_currentModelView.GetWidth() > m_currentModelView.GetHeight());
|
||||
m_routingManager.RoutingSession().SetIsLandscape(m_currentModelView.GetWidth() > m_currentModelView.GetHeight());
|
||||
|
||||
if (m_viewportChangedFn != nullptr)
|
||||
m_viewportChangedFn(screen);
|
||||
|
|
|
@ -260,11 +260,6 @@ public:
|
|||
m_routingSession.SetTurnNotificationsUnits(units);
|
||||
}
|
||||
|
||||
void SetIsLandscape(bool isLandscape)
|
||||
{
|
||||
m_routingSession.SetIsLandscape(isLandscape);
|
||||
}
|
||||
|
||||
void SetDrapeEngine(ref_ptr<df::DrapeEngine> engine, bool is3dAllowed);
|
||||
/// \returns true if altitude information along |m_route| is available and
|
||||
/// false otherwise.
|
||||
|
|
|
@ -427,10 +427,11 @@ void RoutingSession::GetRouteFollowingInfo(FollowingInfo & info) const
|
|||
|
||||
// Lane information and next street name.
|
||||
info.m_lanes.clear();
|
||||
info.m_displayedStreetName = info.m_targetName;
|
||||
if (distanceToTurnMeters < kShowLanesMinDistInMeters
|
||||
|| m_route->GetCurrentTimeToNearestTurnSec() < 60.0)
|
||||
if (distanceToTurnMeters < kShowLanesMinDistInMeters || m_route->GetCurrentTimeToNearestTurnSec() < 60.0)
|
||||
{
|
||||
// Always show next turn street name within a certain distance or a certain time before getting to it
|
||||
info.m_displayedStreetName = info.m_targetName;
|
||||
|
||||
// There are two nested loops below. Outer one is for lanes and inner one (ctor of
|
||||
// SingleLaneInfo) is
|
||||
// for each lane's directions. The size of turn.m_lanes is relatively small. Less than 10 in
|
||||
|
@ -439,10 +440,16 @@ void RoutingSession::GetRouteFollowingInfo(FollowingInfo & info) const
|
|||
for (size_t j = 0; j < turn.m_lanes.size(); ++j)
|
||||
info.m_lanes.emplace_back(turn.m_lanes[j]);
|
||||
}
|
||||
else if(m_isLandscape)
|
||||
else if (m_isLandscape)
|
||||
{
|
||||
// In landscape mode, don't show the next turn street name by default
|
||||
info.m_displayedStreetName = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
// In portrait mode, always show the next turn street name
|
||||
info.m_displayedStreetName = info.m_targetName;
|
||||
}
|
||||
|
||||
// Pedestrian info.
|
||||
info.m_pedestrianTurn = (distanceToTurnMeters < kShowPedestrianTurnInMeters)
|
||||
|
@ -739,7 +746,6 @@ void RoutingSession::SetIsLandscape(bool isLandscape)
|
|||
m_isLandscape = isLandscape;
|
||||
}
|
||||
|
||||
|
||||
void RoutingSession::SetTurnNotificationsLocale(std::string const & locale)
|
||||
{
|
||||
CHECK_THREAD_CHECKER(m_threadChecker, ());
|
||||
|
|
Reference in a new issue