forked from organicmaps/organicmaps
[generator][search] Do NOT accumulate names from parent relations.
This commit is contained in:
parent
c843969f7e
commit
204c32c647
1 changed files with 2 additions and 12 deletions
|
@ -170,13 +170,6 @@ class RelationTagsWay : public RelationTagsBase
|
|||
return (role != "inner");
|
||||
}
|
||||
|
||||
void GetNameKeys(TNameKeys & keys) const
|
||||
{
|
||||
for (auto const & p : TBase::m_current->m_tags)
|
||||
if (strings::StartsWith(p.key, "name"))
|
||||
keys.insert(p.key);
|
||||
}
|
||||
|
||||
protected:
|
||||
void Process(RelationElement const & e) override
|
||||
{
|
||||
|
@ -189,17 +182,14 @@ protected:
|
|||
bool const isWay = (TBase::m_current->type == OsmElement::EntityType::Way);
|
||||
bool const isBoundary = isWay && (type == "boundary") && IsAcceptBoundary(e);
|
||||
|
||||
TNameKeys nameKeys;
|
||||
GetNameKeys(nameKeys);
|
||||
|
||||
for (auto const & p : e.tags)
|
||||
{
|
||||
/// @todo Skip common key tags.
|
||||
if (p.first == "type" || p.first == "route")
|
||||
continue;
|
||||
|
||||
// Skip already existing "name" tags.
|
||||
if (nameKeys.count(p.first) != 0)
|
||||
// Important! Skip all "name" tags.
|
||||
if (strings::StartsWith(p.first, "name"))
|
||||
continue;
|
||||
|
||||
if (!isBoundary && p.first == "boundary")
|
||||
|
|
Loading…
Add table
Reference in a new issue