MCPcopy Create free account
hub / github.com/comaps/comaps / FillBookmarkInfo

Method FillBookmarkInfo

libs/map/framework.cpp:657–679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

655}
656
657void Framework::FillBookmarkInfo(Bookmark const & bmk, place_page::Info & info) const
658{
659 info.SetBookmarkCategoryName(GetBookmarkManager().GetCategoryName(bmk.GetGroupId()));
660 info.SetBookmarkData(bmk.GetData());
661 info.SetBookmarkId(bmk.GetId());
662 info.SetBookmarkCategoryId(bmk.GetGroupId());
663 auto const description = GetPreferredBookmarkStr(info.GetBookmarkData().m_description);
664 auto const openingMode = m_routingManager.IsRoutingActive() || description.empty()
665 ? place_page::OpeningMode::Preview
666 : place_page::OpeningMode::PreviewPlus;
667 info.SetOpeningMode(openingMode);
668 if (bmk.CanFillPlacePageMetadata())
669 {
670 info.SetMercator(bmk.GetPivot());
671 info.SetTitlesForBookmark();
672 info.SetCanEditOrAdd(false);
673 info.SetFromBookmarkProperties(bmk.GetData().m_properties);
674 }
675 else
676 {
677 FillPointInfoForBookmark(bmk, info);
678 }
679}
680
681void Framework::FillTrackInfo(Track const & track, m2::PointD const & trackPoint, place_page::Info & info) const
682{

Callers

nothing calls this directly

Calls 15

GetPreferredBookmarkStrFunction · 0.85
GetCategoryNameMethod · 0.80
SetBookmarkDataMethod · 0.80
SetBookmarkIdMethod · 0.80
SetBookmarkCategoryIdMethod · 0.80
IsRoutingActiveMethod · 0.80
SetOpeningModeMethod · 0.80
SetTitlesForBookmarkMethod · 0.80
SetCanEditOrAddMethod · 0.80

Tested by

no test coverage detected