| 100 | } |
| 101 | |
| 102 | std::string Result::GetFeatureDescription() const |
| 103 | { |
| 104 | std::string res = GetLocalizedFeatureType(); |
| 105 | if (res.empty()) |
| 106 | return res; |
| 107 | |
| 108 | auto const append = [&res](std::string_view sv) |
| 109 | { |
| 110 | if (!res.empty()) |
| 111 | res += feature::kFieldsSeparator; |
| 112 | res += sv; |
| 113 | }; |
| 114 | |
| 115 | // Clear, because GetLocalizedFeatureType will be shown as main title. |
| 116 | if (m_str.empty()) |
| 117 | res.clear(); |
| 118 | |
| 119 | if (m_mainType != m_matchedType && m_matchedType != 0 && !ftypes::Subtypes::Instance().IsSubtype(m_matchedType)) |
| 120 | append(GetLocalizedTypeName(m_matchedType)); |
| 121 | |
| 122 | if (!GetDescription().empty()) |
| 123 | append(GetDescription()); |
| 124 | |
| 125 | return res; |
| 126 | } |
| 127 | |
| 128 | m2::PointD Result::GetFeatureCenter() const |
| 129 | { |
no test coverage detected