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

Method FindUserMarkInTapPosition

libs/map/framework.cpp:2315–2332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2313}
2314
2315UserMark const * Framework::FindUserMarkInTapPosition(place_page::BuildInfo const & buildInfo) const
2316{
2317 UserMark const * mark = GetBookmarkManager().FindNearestUserMark([this, &buildInfo](UserMark::Type type)
2318 {
2319 double constexpr kEps = 1e-7;
2320 if (buildInfo.m_source != place_page::BuildInfo::Source::User)
2321 return df::TapInfo::GetPreciseTapRect(buildInfo.m_mercator, kEps);
2322
2323 if (type == UserMark::Type::BOOKMARK || type == UserMark::Type::TRACK_INFO)
2324 return df::TapInfo::GetBookmarkTapRect(buildInfo.m_mercator, m_currentModelView);
2325
2326 if (type == UserMark::Type::ROUTING || type == UserMark::Type::ROAD_WARNING)
2327 return df::TapInfo::GetRoutingPointTapRect(buildInfo.m_mercator, m_currentModelView);
2328
2329 return df::TapInfo::GetDefaultTapRect(buildInfo.m_mercator, m_currentModelView);
2330 }, [](UserMark::Type type) { return type == UserMark::Type::TRACK_INFO || type == UserMark::Type::TRACK_SELECTION; });
2331 return mark;
2332}
2333
2334void Framework::PredictLocation(double & lat, double & lon, double accuracy, double bearing, double speed,
2335 double elapsedSeconds)

Callers

nothing calls this directly

Calls 1

FindNearestUserMarkMethod · 0.80

Tested by

no test coverage detected