| 1180 | } |
| 1181 | |
| 1182 | void RoutingManager::SetUserCurrentPosition(m2::PointD const & position) |
| 1183 | { |
| 1184 | m_routingSession.PushPositionAccumulator(position); |
| 1185 | |
| 1186 | if (IsRoutingActive()) |
| 1187 | m_routingSession.SetUserCurrentPosition(position); |
| 1188 | |
| 1189 | if (m_routeRecommendCallback != nullptr) |
| 1190 | { |
| 1191 | // Check if we've found my position almost immediately after route points loading. |
| 1192 | auto constexpr kFoundLocationInterval = 2.0; |
| 1193 | auto const elapsed = chrono::steady_clock::now() - m_loadRoutePointsTimestamp; |
| 1194 | auto const sec = chrono::duration_cast<chrono::duration<double>>(elapsed).count(); |
| 1195 | if (sec <= kFoundLocationInterval) |
| 1196 | { |
| 1197 | m_routeRecommendCallback(Recommendation::RebuildAfterPointsLoading); |
| 1198 | CancelRecommendation(Recommendation::RebuildAfterPointsLoading); |
| 1199 | } |
| 1200 | } |
| 1201 | } |
| 1202 | |
| 1203 | static std::string GetNameFromPoint(RouteMarkData const & rmd) |
| 1204 | { |
no test coverage detected