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

Method FindNearestTrack

libs/map/bookmark_manager.cpp:901–924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

899}
900
901Track::TrackSelectionInfo BookmarkManager::FindNearestTrack(m2::RectD const & touchRect,
902 TracksFilter const & tracksFilter) const
903{
904 CHECK_THREAD_CHECKER(m_threadChecker, ());
905 Track::TrackSelectionInfo selectionInfo;
906
907 for (auto const & pair : m_categories)
908 {
909 auto const & category = *pair.second;
910 if (!category.IsVisible())
911 continue;
912
913 for (auto trackId : category.GetUserLines())
914 {
915 auto const track = GetTrack(trackId);
916 if (tracksFilter && !tracksFilter(track))
917 continue;
918
919 track->UpdateSelectionInfo(touchRect, selectionInfo);
920 }
921 }
922
923 return selectionInfo;
924}
925
926Track::TrackSelectionInfo BookmarkManager::GetTrackSelectionInfo(kml::TrackId const & trackId) const
927{

Callers 1

Calls 2

UpdateSelectionInfoMethod · 0.80
IsVisibleMethod · 0.45

Tested by

no test coverage detected