| 1067 | } |
| 1068 | |
| 1069 | void Geocoder::MatchAroundPivot(BaseContext & ctx) |
| 1070 | { |
| 1071 | TRACE(MatchAroundPivot); |
| 1072 | |
| 1073 | ViewportFilter filter(CBV::GetFull(), m_preRanker.Limit() /* threshold */); |
| 1074 | |
| 1075 | CentersFilter centers; |
| 1076 | auto const & mwmType = m_context->GetType(); |
| 1077 | if (mwmType.m_containsUserPosition) |
| 1078 | { |
| 1079 | CHECK(m_params.m_position, ()); |
| 1080 | if (mwmType.m_viewportIntersected) |
| 1081 | centers.Add(m_params.m_pivot.Center()); |
| 1082 | centers.Add(*m_params.m_position); |
| 1083 | } |
| 1084 | else |
| 1085 | centers.Add(m_params.m_pivot.Center()); |
| 1086 | |
| 1087 | LimitedSearch(ctx, filter, centers); |
| 1088 | } |
| 1089 | |
| 1090 | void Geocoder::LimitedSearch(BaseContext & ctx, FeaturesFilter const & filter, CentersFilter const & centers) |
| 1091 | { |