| 39 | |
| 40 | template <class Box> |
| 41 | void DrawLine(Box const & box, dp::Color const & color, df::DrapeApi & drapeApi, std::string const & id) |
| 42 | { |
| 43 | auto points = box.Points(); |
| 44 | CHECK(!points.empty(), ()); |
| 45 | points.push_back(points.front()); |
| 46 | |
| 47 | points.erase(unique(points.begin(), points.end(), |
| 48 | [](m2::PointD const & p1, m2::PointD const & p2) |
| 49 | { |
| 50 | m2::PointD const delta = p2 - p1; |
| 51 | return delta.IsAlmostZero(); |
| 52 | }), |
| 53 | points.end()); |
| 54 | |
| 55 | if (points.size() <= 1) |
| 56 | return; |
| 57 | |
| 58 | drapeApi.AddLine(id, df::DrapeApiLineData(points, color).Width(3.0f).ShowPoints(true).ShowId()); |
| 59 | } |
| 60 | |
| 61 | void VisualizeFeatureInRect(m2::RectD const & rect, FeatureType & ft, df::DrapeApi & drapeApi) |
| 62 | { |
no test coverage detected