Different color for pedestrian route

This commit is contained in:
Constantin Shalnev 2015-07-08 17:08:38 +03:00 committed by Alex Zolotarev
parent 5dd7e6f0b8
commit 264c70b824
2 changed files with 10 additions and 1 deletions

View file

@ -2181,6 +2181,7 @@ void Framework::SetRouter(RouterType type)
}
m_routingSession.SetRouter(move(router), move(fetcher), routingStatisticsFn);
m_currentRouterType = type;
}
void Framework::RemoveRoute()
@ -2212,9 +2213,16 @@ void Framework::InsertRoute(Route const & route)
track.SetName(route.GetName());
track.SetTurnsGeometry(route.GetTurnsGeometry());
/// @todo Consider a style parameter for the route color.
graphics::Color routeColor;
if (m_currentRouterType == RouterType::Pedestrian)
routeColor = graphics::Color(5, 105, 175, 255);
else
routeColor = graphics::Color(110, 180, 240, 255);
Track::TrackOutline outlines[]
{
{ 10.0f * visScale, graphics::Color(110, 180, 240, 255) }
{ 10.0f * visScale, routeColor }
};
track.AddOutline(outlines, ARRAY_SIZE(outlines));

View file

@ -586,6 +586,7 @@ private:
string GetRoutingErrorMessage(routing::IRouter::ResultCode code);
TRouteBuildingCallback m_routingCallback;
routing::RouterType m_currentRouterType;
//@}
public: