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

Method CollectTransitDisplayInfo

libs/map/transit/transit_display.cpp:756–779  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754}
755
756void TransitRouteDisplay::CollectTransitDisplayInfo(vector<routing::RouteSegment> const & segments,
757 TransitDisplayInfos & transitDisplayInfos)
758{
759 for (auto const & s : segments)
760 {
761 if (!s.HasTransitInfo())
762 continue;
763
764 auto const mwmId = m_getMwmIdFn(s.GetSegment().GetMwmId());
765
766 auto & mwmTransit = transitDisplayInfos[mwmId];
767 if (mwmTransit == nullptr)
768 mwmTransit = make_unique<TransitDisplayInfo>();
769
770 routing::TransitInfo const & transitInfo = s.GetTransitInfo();
771
772 mwmTransit->m_transitVersion = transitInfo.GetVersion();
773
774 if (transitInfo.GetVersion() == ::transit::TransitVersion::OnlySubway)
775 FillMwmTransitSubway(mwmTransit, transitInfo, mwmId);
776 else if (transitInfo.GetVersion() == ::transit::TransitVersion::AllPublicTransport)
777 FillMwmTransitPT(mwmTransit, transitInfo, mwmId);
778 }
779}
780
781TransitMark * TransitRouteDisplay::CreateMark(m2::PointD const & pt, FeatureID const & fid)
782{

Callers

nothing calls this directly

Calls 7

FillMwmTransitSubwayFunction · 0.85
FillMwmTransitPTFunction · 0.85
GetSegmentMethod · 0.80
HasTransitInfoMethod · 0.45
GetMwmIdMethod · 0.45
GetTransitInfoMethod · 0.45
GetVersionMethod · 0.45

Tested by

no test coverage detected