| 209 | } |
| 210 | |
| 211 | void DataSource::ForEachInIntervals(ReaderCallback const & fn, covering::CoveringMode mode, m2::RectD const & rect, |
| 212 | int scale) const |
| 213 | { |
| 214 | std::vector<std::shared_ptr<MwmInfo>> mwms; |
| 215 | GetMwmsInfo(mwms); |
| 216 | |
| 217 | covering::CoveringGetter cov(rect, mode); |
| 218 | |
| 219 | MwmId worldID[2]; |
| 220 | |
| 221 | for (auto const & info : mwms) |
| 222 | { |
| 223 | if (info->m_minScale <= scale && scale <= info->m_maxScale && rect.IsIntersect(info->m_bordersRect)) |
| 224 | { |
| 225 | MwmId const mwmId(info); |
| 226 | switch (info->GetType()) |
| 227 | { |
| 228 | case MwmInfo::COUNTRY: fn(GetMwmHandleById(mwmId), cov, scale); break; |
| 229 | case MwmInfo::COASTS: worldID[0] = mwmId; break; |
| 230 | case MwmInfo::WORLD: worldID[1] = mwmId; break; |
| 231 | } |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | if (worldID[0].IsAlive()) |
| 236 | fn(GetMwmHandleById(worldID[0]), cov, scale); |
| 237 | |
| 238 | if (worldID[1].IsAlive()) |
| 239 | fn(GetMwmHandleById(worldID[1]), cov, scale); |
| 240 | } |
| 241 | |
| 242 | void DataSource::ForEachFeatureIDInRect(FeatureIdCallback const & f, m2::RectD const & rect, int scale, |
| 243 | covering::CoveringMode mode /* = covering::ViewportWithLowLevels */) const |
nothing calls this directly
no test coverage detected