diff options
author | vng <viktor.govako@gmail.com> | 2012-04-20 15:05:42 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:37:41 +0300 |
commit | acc8e5bcdf39993399c732decc507ead32cfd5db (patch) | |
tree | e32cdeee5740cb442c1cbe0ea6ad770caeb6717c /map/address_finder.cpp | |
parent | d8d626dda4acecf1b9ec07c29b159ab703ba07cd (diff) |
Fix bug with locality detection (do not check on scale visibility).
Diffstat (limited to 'map/address_finder.cpp')
-rw-r--r-- | map/address_finder.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/map/address_finder.cpp b/map/address_finder.cpp index 1f985f2db2..b57bcfe59b 100644 --- a/map/address_finder.cpp +++ b/map/address_finder.cpp @@ -8,11 +8,9 @@ namespace { class FeatureInfoT { - double m_dist; - public: FeatureInfoT(double d, feature::TypesHolder & types, string & name, m2::PointD const & pt) - : m_dist(d), m_types(types), m_pt(pt) + : m_types(types), m_pt(pt), m_dist(d) { m_name.swap(name); } @@ -32,6 +30,7 @@ namespace string m_name; feature::TypesHolder m_types; m2::PointD m_pt; + double m_dist; }; void swap(FeatureInfoT & i1, FeatureInfoT & i2) @@ -39,6 +38,11 @@ namespace i1.Swap(i2); } + string DebugPrint(FeatureInfoT const & info) + { + return ("Name = " + info.m_name + " Distance = " + strings::to_string(info.m_dist)); + } + class DoGetFeatureInfoBase { protected: @@ -272,11 +276,10 @@ namespace } virtual double NeedProcess(feature::TypesHolder const & types) const { - if (!DoGetFeatureInfoBase::NeedProcess(types)) - return false; - - return (!m_doLocalities || - (types.GetGeoType() == feature::GEOM_POINT && m_checker.IsLocality(types))); + if (m_doLocalities) + return (types.GetGeoType() == feature::GEOM_POINT && m_checker.IsLocality(types)); + else + return DoGetFeatureInfoBase::NeedProcess(types); } public: @@ -322,6 +325,7 @@ namespace void FillLocality(Framework::AddressInfo & info, Framework const & fm) { SortResults(); + //LOG(LDEBUG, (m_cont)); for (size_t i = 0; i < m_cont.size(); ++i) { |