[discovery] distance to pivot is changed to distance to center

This commit is contained in:
Arsentiy Milchakov 2018-07-17 14:31:34 +03:00 committed by Vlad Mihaylenko
parent 4db06d20b3
commit 7b21b0fe1f

View file

@ -165,7 +165,10 @@ private:
for (size_t i = 0; i < m_results.GetCount(); ++i)
{
if (m_results[i].GetRankingInfo().m_distanceToPivot > maxDistance)
auto distanceToCenter =
MercatorBounds::DistanceOnEarth(m_results[i].GetFeatureCenter(), v.Center());
if (distanceToCenter > maxDistance)
continue;
ret.emplace(m_results[i], m_productInfo[i]);