| 503 | } |
| 504 | |
| 505 | void TransitRouteDisplay::AddGateSubwayForSubroute(routing::RouteSegment const & segment, df::Subroute & subroute, |
| 506 | SubrouteParams & sp, SubrouteSegmentParams & ssp) |
| 507 | { |
| 508 | auto const & gate = ssp.m_transitInfo.GetGateSubway(); |
| 509 | if (sp.m_lastLineId != routing::transit::kInvalidLineId) |
| 510 | { |
| 511 | m_routeInfo.AddStep(TransitStepInfo(TransitType::Pedestrian, ssp.m_distance, ssp.m_time)); |
| 512 | |
| 513 | AddTransitGateSegment(segment.GetJunction().GetPoint(), sp.m_lastColor, subroute); |
| 514 | |
| 515 | subroute.m_markers.push_back(sp.m_marker); |
| 516 | sp.m_marker = df::SubrouteMarker(); |
| 517 | |
| 518 | sp.m_transitMarkInfo.m_type = TransitMarkInfo::Type::KeyStop; |
| 519 | sp.m_transitMarkInfo.m_symbolName = kTransitSymbols.at(sp.m_transitType); |
| 520 | sp.m_transitMarkInfo.m_color = sp.m_lastColor; |
| 521 | m_transitMarks.push_back(sp.m_transitMarkInfo); |
| 522 | sp.m_transitMarkInfo = TransitMarkInfo(); |
| 523 | } |
| 524 | else |
| 525 | { |
| 526 | sp.m_pendingEntrance = true; |
| 527 | } |
| 528 | |
| 529 | auto gateMarkInfo = TransitMarkInfo(); |
| 530 | gateMarkInfo.m_point = sp.m_pendingEntrance ? subroute.m_polyline.Back() : segment.GetJunction().GetPoint(); |
| 531 | gateMarkInfo.m_type = TransitMarkInfo::Type::Gate; |
| 532 | gateMarkInfo.m_symbolName = kZeroIcon; |
| 533 | if (gate.m_featureId != kInvalidFeatureId) |
| 534 | { |
| 535 | auto const fid = FeatureID(ssp.m_mwmId, gate.m_featureId); |
| 536 | auto const & featureInfo = ssp.m_displayInfo.m_features.at(fid); |
| 537 | auto symbolName = featureInfo.m_gateSymbolName; |
| 538 | if (symbolName.ends_with("-s") || symbolName.ends_with("-m") || symbolName.ends_with("-l")) |
| 539 | symbolName = symbolName.substr(0, symbolName.rfind('-')); |
| 540 | |
| 541 | gateMarkInfo.m_featureId = fid; |
| 542 | if (!symbolName.empty()) |
| 543 | gateMarkInfo.m_symbolName = symbolName; |
| 544 | auto const title = m_getStringsBundleFn().GetString(sp.m_pendingEntrance ? "core_entrance" : "core_exit"); |
| 545 | gateMarkInfo.m_titles.emplace_back(title, df::GetTransitTextColorName("default")); |
| 546 | } |
| 547 | |
| 548 | m_transitMarks.push_back(gateMarkInfo); |
| 549 | } |
| 550 | |
| 551 | void TransitRouteDisplay::AddGatePTForSubroute(routing::RouteSegment const & segment, df::Subroute & subroute, |
| 552 | SubrouteParams & sp, SubrouteSegmentParams & ssp) |
nothing calls this directly
no test coverage detected