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

Method ReadFeatureIndex

libs/drape_frontend/tile_info.cpp:27–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void TileInfo::ReadFeatureIndex(MapDataProvider const & model)
28{
29 if (!DoNeedReadIndex())
30 return;
31
32 ThrowIfCancelled();
33
34 size_t constexpr kAverageFeaturesCount = 256;
35 m_featureInfo.reserve(kAverageFeaturesCount);
36
37 MwmSet::MwmId lastMwm;
38 model.ReadFeaturesID([this, &lastMwm](FeatureID const & id)
39 {
40 if (m_mwms.empty() || lastMwm != id.m_mwmId)
41 {
42 auto result = m_mwms.insert(id.m_mwmId);
43 VERIFY(result.second, ());
44 lastMwm = id.m_mwmId;
45 }
46 m_featureInfo.push_back(id);
47 }, GetGlobalRect(), GetZoomLevel());
48}
49
50void TileInfo::ReadFeatures(MapDataProvider const & model)
51{

Callers

nothing calls this directly

Calls 6

ReadFeaturesIDMethod · 0.80
GetZoomLevelFunction · 0.70
reserveMethod · 0.45
emptyMethod · 0.45
insertMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected