forked from organicmaps/organicmaps
[search] Fix NameScores calculation for road shields.
This commit is contained in:
parent
5fb5d2e944
commit
acf7e01169
1 changed files with 4 additions and 3 deletions
|
@ -15,6 +15,7 @@
|
|||
#include "indexer/data_source.hpp"
|
||||
#include "indexer/feature_algo.hpp"
|
||||
#include "indexer/ftypes_matcher.hpp"
|
||||
#include "indexer/road_shields_parser.hpp"
|
||||
#include "indexer/search_string_utils.hpp"
|
||||
|
||||
#include "coding/string_utf8_multilang.hpp"
|
||||
|
@ -146,9 +147,9 @@ pair<NameScores, size_t> GetNameScores(FeatureType & ft, Geocoder::Params const
|
|||
|
||||
if (type == Model::TYPE_STREET)
|
||||
{
|
||||
auto const roadNumber = ft.GetRoadNumber();
|
||||
if (!roadNumber.empty())
|
||||
UpdateNameScores(roadNumber, sliceNoCategories, bestScores);
|
||||
auto const shields = ftypes::GetRoadShields(ft);
|
||||
for (auto const & shield : shields)
|
||||
UpdateNameScores(shield.m_name, sliceNoCategories, bestScores);
|
||||
}
|
||||
|
||||
return make_pair(bestScores, matchedLength);
|
||||
|
|
Loading…
Add table
Reference in a new issue