diff options
author | vng <viktor.govako@gmail.com> | 2013-07-05 21:12:30 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:58:09 +0300 |
commit | e578ff0326ff9d69ee7bc9b58397902c35b71a4b (patch) | |
tree | 043020ad33c72b2ee5330d9cf46d87d27015316e /map/address_finder.cpp | |
parent | 0f6fc7d4e654bc9894ecb5028e18330076d19d7a (diff) |
Get most readable name for users in AddressInfo.
Diffstat (limited to 'map/address_finder.cpp')
-rw-r--r-- | map/address_finder.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/map/address_finder.cpp b/map/address_finder.cpp index d507816908..046af7cf15 100644 --- a/map/address_finder.cpp +++ b/map/address_finder.cpp @@ -98,13 +98,13 @@ namespace if (IsInclude(d, types)) { - string name, house; - f.GetPreferredNames(name, house /*dummy parameter*/); - house = f.GetHouseNumber(); + string name; + f.GetReadableName(name); + string house = f.GetHouseNumber(); // if geom type is not GEOM_POINT, result center point doesn't matter in future use - m2::PointD const pt = (types.GetGeoType() == feature::GEOM_POINT) ? - f.GetCenter() : m2::PointD(); + m2::PointD const pt = + (types.GetGeoType() == feature::GEOM_POINT) ? f.GetCenter() : m2::PointD(); // name, house are assigned like move semantics m_cont.push_back(FeatureInfoT(GetResultDistance(d, types), types, name, house, pt)); @@ -495,9 +495,10 @@ void Framework::GetAddressInfoForGlobalPoint(m2::PointD const & pt, search::Addr DoGetAddressInfo getAddress(pt, scale, GetChecker(), addressR); m_model.ForEachFeature(rect, getAddress, scale); - getAddress.FillAddress(GetSearchEngine(), info); - GetLocality(pt, info); + + /// @todo Temporarily commented - it's slow and not used in UI + //GetLocality(pt, info); } void Framework::GetAddressInfo(FeatureType const & ft, m2::PointD const & pt, search::AddressInfo & info) const @@ -519,7 +520,7 @@ void Framework::GetAddressInfo(FeatureType const & ft, m2::PointD const & pt, se getAddress(ft); getAddress.FillAddress(GetSearchEngine(), info); - // @TODO Temporarily commented - it's slow and not used in UI + /// @todo Temporarily commented - it's slow and not used in UI //GetLocality(pt, info); } |