diff --git a/routing/base/followed_polyline.cpp b/routing/base/followed_polyline.cpp index 1fb99e545a..313ac3b14a 100644 --- a/routing/base/followed_polyline.cpp +++ b/routing/base/followed_polyline.cpp @@ -1,8 +1,11 @@ #include "followed_polyline.hpp" +#include +#include + namespace routing { - +using namespace std; using Iter = routing::FollowedPolyline::Iter; Iter FollowedPolyline::Begin() const diff --git a/routing/base/followed_polyline.hpp b/routing/base/followed_polyline.hpp index 023b627935..fc69abb6c4 100644 --- a/routing/base/followed_polyline.hpp +++ b/routing/base/followed_polyline.hpp @@ -5,6 +5,8 @@ #include "geometry/point2d.hpp" #include "geometry/polyline2d.hpp" +#include + namespace routing { class FollowedPolyline @@ -22,12 +24,14 @@ public: bool IsValid() const { return (m_current.IsValid() && m_poly.GetSize() > 1); } m2::PolylineD const & GetPolyline() const { return m_poly; } + vector const & GetSegDistanceMeters() const { return m_segDistance; } double GetTotalDistanceMeters() const; double GetDistanceFromStartMeters() const; double GetDistanceToEndMeters() const; double GetDistFromCurPointToRoutePointMerc() const; double GetDistFromCurPointToRoutePointMeters() const; + double GetMercatorDistanceFromBegin() const; /*! \brief Return next navigation point for direction widgets. * Returns first geometry point from the polyline after your location if it is farther then @@ -72,9 +76,9 @@ private: /// Iterator with the current position. Position sets with UpdateProjection methods. mutable Iter m_current; /// Precalculated info for fast projection finding. - vector> m_segProj; + std::vector> m_segProj; /// Accumulated cache of segments length in meters. - vector m_segDistance; + std::vector m_segDistance; }; } // namespace routing