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

Method SetTrackSelectionMark

libs/map/bookmark_manager.cpp:960–982  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

958}
959
960void BookmarkManager::SetTrackSelectionMark(kml::TrackId trackId, m2::PointD const & pt, double distance)
961{
962 auto const markId = GetTrackSelectionMarkId(trackId);
963
964 TrackSelectionMark * trackSelectionMark;
965 if (markId == kml::kInvalidMarkId)
966 {
967 trackSelectionMark = CreateUserMark<TrackSelectionMark>(pt);
968 trackSelectionMark->SetTrackId(trackId);
969
970 if (m_drapeEngine)
971 trackSelectionMark->SetMinVisibleZoom(GetTrackSelectionMarkMinZoom(trackId));
972 }
973 else
974 {
975 trackSelectionMark = GetMarkForEdit<TrackSelectionMark>(markId);
976 trackSelectionMark->SetPosition(pt);
977 }
978 trackSelectionMark->SetDistance(distance);
979
980 auto const isVisible = IsVisible(GetTrack(trackId)->GetGroupId());
981 trackSelectionMark->SetIsVisible(isVisible);
982}
983
984void BookmarkManager::DeleteTrackSelectionMark(kml::TrackId trackId)
985{

Callers

nothing calls this directly

Calls 6

SetMinVisibleZoomMethod · 0.80
SetTrackIdMethod · 0.45
SetPositionMethod · 0.45
SetDistanceMethod · 0.45
GetGroupIdMethod · 0.45
SetIsVisibleMethod · 0.45

Tested by

no test coverage detected