| 162 | } |
| 163 | |
| 164 | Iter FollowedPolyline::UpdateProjection(m2::RectD const & posRect) |
| 165 | { |
| 166 | ASSERT(m_current.IsValid(), ()); |
| 167 | ASSERT_LESS(m_current.m_ind, m_poly.GetSize() - 1, ()); |
| 168 | |
| 169 | Iter res; |
| 170 | m2::PointD const currPos = posRect.Center(); |
| 171 | res = GetBestProjection(posRect, [&](Iter const & it) { return mercator::DistanceOnEarth(it.m_pt, currPos); }); |
| 172 | |
| 173 | if (res.IsValid()) |
| 174 | m_current = res; |
| 175 | return res; |
| 176 | } |
| 177 | |
| 178 | void FollowedPolyline::SetFakeSegmentIndexes(vector<size_t> && fakeSegmentIndexes) |
| 179 | { |