Removed unused GetVisiblePOI, because:

- It can’t process area features.
- It’s already used in the drape core to select visible POINT-type feature.
This commit is contained in:
Alex Zolotarev 2016-01-13 10:42:46 +03:00 committed by Sergey Yershov
parent f78afa65d4
commit 2ed1ad2d3d
2 changed files with 0 additions and 23 deletions

View file

@ -1668,26 +1668,6 @@ unique_ptr<FeatureType> Framework::GetFeatureAtMercatorPoint(m2::PointD const &
return pointFt ? move(pointFt) : move(areaFt);
}
bool Framework::GetVisiblePOI(m2::PointD const & glbPoint, search::AddressInfo & info, feature::Metadata & metadata) const
{
ASSERT(m_drapeEngine != nullptr, ());
FeatureID const id = m_drapeEngine->GetVisiblePOI(glbPoint);
if (!id.IsValid())
return false;
auto const feature = GetPOIByID(id);
metadata = feature->GetMetadata();
info = GetPOIAddressInfo(*feature);
return true;
}
unique_ptr<FeatureType> Framework::GetVisiblePOI(m2::PointD const & ptMercator) const
{
ASSERT(m_drapeEngine != nullptr, ());
FeatureID const fid = m_drapeEngine->GetVisiblePOI(ptMercator);
return fid.IsValid() ? GetPOIByID(fid) : unique_ptr<FeatureType>();
}
unique_ptr<FeatureType> Framework::GetPOIByID(FeatureID const & fid) const
{
ASSERT(fid.IsValid(), ());

View file

@ -489,9 +489,6 @@ public:
/// TODO(AlexZ): Refactor out other similar methods.
/// @returns nullptr if no feature was found at the given mercator point.
unique_ptr<FeatureType> GetFeatureAtMercatorPoint(m2::PointD const & mercator) const;
bool GetVisiblePOI(m2::PointD const & glbPoint, search::AddressInfo & info, feature::Metadata & metadata) const;
// TODO(AlexZ): Refactor similar getters to share common interface.
unique_ptr<FeatureType> GetVisiblePOI(m2::PointD const & ptMercator) const;
// TODO(AlexZ): Do we really need to avoid linear features?
unique_ptr<FeatureType> GetPOIByID(FeatureID const & fid) const;
void FindClosestPOIMetadata(m2::PointD const & pt, feature::Metadata & metadata) const;