| 711 | } |
| 712 | |
| 713 | void RoutingManager::CreateRoadWarningMarks(RoadWarningsCollection && roadWarnings) |
| 714 | { |
| 715 | if (roadWarnings.empty()) |
| 716 | return; |
| 717 | |
| 718 | GetPlatform().RunTask(Platform::Thread::Gui, [this, roadWarnings = std::move(roadWarnings)]() |
| 719 | { |
| 720 | auto es = m_bmManager->GetEditSession(); |
| 721 | for (auto const & typeInfo : roadWarnings) |
| 722 | { |
| 723 | auto const type = GetRoadType(typeInfo.first); |
| 724 | for (size_t i = 0; i < typeInfo.second.size(); ++i) |
| 725 | { |
| 726 | auto const & routeInfo = typeInfo.second[i]; |
| 727 | auto mark = es.CreateUserMark<RoadWarningMark>(routeInfo.m_startPoint); |
| 728 | mark->SetIndex(static_cast<uint32_t>(i)); |
| 729 | mark->SetRoadWarningType(type); |
| 730 | mark->SetFeatureId(routeInfo.m_featureId); |
| 731 | std::string distanceStr = platform::Distance::CreateFormatted(routeInfo.m_distance).ToString(); |
| 732 | mark->SetDistance(distanceStr); |
| 733 | } |
| 734 | } |
| 735 | }); |
| 736 | } |
| 737 | |
| 738 | void RoutingManager::CollectTrafficLights(vector<RouteSegment> const & segments, m2::PointD const & startPt, vector<std::pair<m2::PointD, FeatureID>> & trafficLights) |
| 739 | { |
nothing calls this directly
no test coverage detected