| 309 | } |
| 310 | |
| 311 | kml::LocalizableString Info::FormatNewBookmarkName() const |
| 312 | { |
| 313 | kml::LocalizableString bookmarkName; |
| 314 | if (IsFeature()) |
| 315 | { |
| 316 | m_name.ForEach([&bookmarkName](int8_t langCode, std::string_view localName) |
| 317 | { |
| 318 | if (!localName.empty()) |
| 319 | bookmarkName[langCode] = localName; |
| 320 | }); |
| 321 | |
| 322 | if (bookmarkName.empty() && IsBuilding() && !m_address.empty()) |
| 323 | kml::SetDefaultStr(bookmarkName, m_address); |
| 324 | } |
| 325 | else if (!m_uiTitle.empty()) |
| 326 | { |
| 327 | if (IsMyPosition()) |
| 328 | kml::SetDefaultStr(bookmarkName, platform::GetLocalizedMyPositionBookmarkName()); |
| 329 | else |
| 330 | kml::SetDefaultStr(bookmarkName, m_uiTitle); |
| 331 | } |
| 332 | |
| 333 | return bookmarkName; |
| 334 | } |
| 335 | |
| 336 | std::string Info::GetFormattedCoordinate(CoordinatesFormat coordsFormat) const |
| 337 | { |
no test coverage detected