diff options
author | vng <viktor.govako@gmail.com> | 2012-05-15 17:17:17 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:38:22 +0300 |
commit | 58e55db2d7175e5649e1890aa53d1ad590af9dc3 (patch) | |
tree | 6bfa0c7a76a6d9a7c39dbca10f56166407fcf018 /map/address_finder.cpp | |
parent | 2daef24bc1b7bfa388766e32f78c93e3764f0cf1 (diff) |
Process features with names only for address lookup.
Diffstat (limited to 'map/address_finder.cpp')
-rw-r--r-- | map/address_finder.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/map/address_finder.cpp b/map/address_finder.cpp index 438411e7ee..2551f8b649 100644 --- a/map/address_finder.cpp +++ b/map/address_finder.cpp @@ -56,10 +56,13 @@ namespace virtual double GetResultDistance(double d, feature::TypesHolder const & types) const = 0; virtual double NeedProcess(feature::TypesHolder const & types) const { + // feature should be visible in needed scale pair<int, int> const r = feature::GetDrawableScaleRange(types); return my::between_s(r.first, r.second, m_scale); } + /// @return epsilon value for distance compare according to priority: + /// point feature is better than linear, that is better than area. static double GetCompareEpsilonImpl(feature::EGeomType type, double eps) { using namespace feature; @@ -298,9 +301,15 @@ namespace virtual double NeedProcess(feature::TypesHolder const & types) const { if (m_doLocalities) + { return (types.GetGeoType() == feature::GEOM_POINT && m_checker.IsLocality(types)); + } else - return DoGetFeatureInfoBase::NeedProcess(types); + { + // we need features with texts for address lookup + pair<int, int> const r = feature::GetDrawableScaleRangeForText(types); + return my::between_s(r.first, r.second, m_scale); + } } public: |