diff --git a/data/mapcss-mapping.csv b/data/mapcss-mapping.csv index e88f26ee3f..9b75bbe68a 100644 --- a/data/mapcss-mapping.csv +++ b/data/mapcss-mapping.csv @@ -585,7 +585,7 @@ natural|water|lock;[natural=water][water=lock];;name;int_name;498; deprecated:waterway|lock:06.2022;499;waterway|canal fee|yes;[fee?];;name;int_name;500; fee|no;[fee=no];;name;int_name;501; -deprecated|deprecated;502;x +toilets|yes;502; highway|trunk_link|tunnel;[highway=trunk_link][tunnel?];;name;int_name;503; deprecated|deprecated;504;x deprecated|deprecated;505;x diff --git a/data/replaced_tags.txt b/data/replaced_tags.txt index 869eab111a..b19b9ac3c9 100644 --- a/data/replaced_tags.txt +++ b/data/replaced_tags.txt @@ -32,7 +32,6 @@ atm=yes : amenity=atm bench=yes : amenity=bench shelter=yes : amenity=shelter -toilets=yes : amenity=toilets restaurant=yes : amenity=restaurant ice_cream=yes : amenity=ice_cream diff --git a/generator/generator_tests/osm_type_test.cpp b/generator/generator_tests/osm_type_test.cpp index 511b59a999..faf7948ad9 100644 --- a/generator/generator_tests/osm_type_test.cpp +++ b/generator/generator_tests/osm_type_test.cpp @@ -409,7 +409,7 @@ UNIT_CLASS_TEST(TestWithClassificator, OsmType_Synonyms) TEST(params.IsTypeExist(GetType({"shop"})), ()); TEST(params.IsTypeExist(GetType({"amenity", "restaurant"})), ()); TEST(params.IsTypeExist(GetType({"tourism", "hotel"})), ()); - TEST(params.IsTypeExist(GetType({"amenity", "toilets"})), ()); + TEST(params.IsTypeExist(GetType({"toilets", "yes"})), ()); TEST(params.IsTypeExist(GetType({"amenity", "drinking_water"})), ()); } diff --git a/indexer/feature_visibility.cpp b/indexer/feature_visibility.cpp index 654adccaed..c6c503e64e 100644 --- a/indexer/feature_visibility.cpp +++ b/indexer/feature_visibility.cpp @@ -138,15 +138,16 @@ namespace if (IsUsefulStandaloneType(type, geomType)) return true; - static uint32_t const internet = cl.GetTypeByPath({"internet_access"}); - static uint32_t const complexEntry = cl.GetTypeByPath({"complex_entry"}); - uint8_t const typeLevel = ftype::GetLevel(type); ftype::TruncValue(type, 1); if (geomType != GeomType::Line) { - if (type == internet) + static uint32_t const arrTypes[] = { + cl.GetTypeByPath({"internet_access"}), + cl.GetTypeByPath({"toilets"}), + }; + if (base::IsExist(arrTypes, type)) return true; // Exclude generic 1-arity types like [organic]. @@ -161,6 +162,7 @@ namespace } } + static uint32_t const complexEntry = cl.GetTypeByPath({"complex_entry"}); return (type == complexEntry); }