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

Method VisualizeCityRoadsInRect

libs/map/framework_visualize.cpp:132–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132void Framework::VisualizeCityRoadsInRect(m2::RectD const & rect)
133{
134 std::map<MwmSet::MwmId, std::unique_ptr<routing::CityRoads>> cityRoads;
135 GetDataSource().ForEachInRect([&](FeatureType & ft)
136 {
137 if (ft.GetGeomType() != feature::GeomType::Line)
138 return;
139
140 auto const & mwmId = ft.GetID().m_mwmId;
141 auto const it = cityRoads.find(mwmId);
142 if (it == cityRoads.cend())
143 {
144 MwmSet::MwmHandle handle = m_featuresFetcher.GetDataSource().GetMwmHandleById(mwmId);
145 CHECK(handle.IsAlive(), ());
146
147 cityRoads[mwmId] = routing::LoadCityRoads(handle);
148 }
149
150 if (cityRoads[mwmId]->IsCityRoad(ft.GetID().m_index))
151 VisualizeFeatureInRect(rect, ft, m_drapeApi);
152 }, rect, scales::GetUpperScale());
153}
154
155void Framework::VisualizeCrossMwmTransitionsInRect(m2::RectD const & rect)
156{

Callers 1

ProcessSelectionModeMethod · 0.80

Calls 12

VisualizeFeatureInRectFunction · 0.85
GetUpperScaleFunction · 0.85
GetDataSourceMethod · 0.80
IsCityRoadMethod · 0.80
LoadCityRoadsFunction · 0.50
ForEachInRectMethod · 0.45
GetGeomTypeMethod · 0.45
GetIDMethod · 0.45
findMethod · 0.45
cendMethod · 0.45
GetMwmHandleByIdMethod · 0.45
IsAliveMethod · 0.45

Tested by

no test coverage detected