diff --git a/map/information_display.cpp b/map/information_display.cpp index 890badfaa4..194edb9807 100644 --- a/map/information_display.cpp +++ b/map/information_display.cpp @@ -31,6 +31,7 @@ InformationDisplay::InformationDisplay() enableMemoryWarning(false); enableBenchmarkInfo(false); enableEmptyModelMessage(false); + enablePlacemark(false); for (int i = 0; i < sizeof(m_DebugPts) / sizeof(m2::PointD); ++i) m_DebugPts[i] = m2::PointD(0, 0); @@ -243,6 +244,21 @@ void InformationDisplay::drawMemoryWarning(DrawerYG * drawer) enableMemoryWarning(false); } +void InformationDisplay::enablePlacemark(bool doEnable) +{ + m_isPlacemarkEnabled = doEnable; +} + +void InformationDisplay::setPlacemarkPosition(m2::PointD const & glbPos) +{ + m_placemarkPos = glbPos; +} + +void InformationDisplay::drawPlacemark(DrawerYG *pDrawer) +{ + pDrawer->drawSymbol(m_screen.GtoP(m_placemarkPos), "placemark", yg::EPosAbove, yg::maxDepth); +} + bool InformationDisplay::s_isLogEnabled = false; list InformationDisplay::s_log; size_t InformationDisplay::s_logSize = 10; @@ -441,4 +457,6 @@ void InformationDisplay::doDraw(DrawerYG *drawer) drawLog(drawer); if (m_isEmptyModelMessageEnabled) drawEmptyModelMessage(drawer); + if (m_isPlacemarkEnabled) + drawPlacemark(drawer); } diff --git a/map/information_display.hpp b/map/information_display.hpp index 55db849ca4..944f8841c5 100644 --- a/map/information_display.hpp +++ b/map/information_display.hpp @@ -36,6 +36,9 @@ private: bool m_isRulerEnabled; Ruler m_ruler; + bool m_isPlacemarkEnabled; + m2::PointD m_placemarkPos; + bool m_isCenterEnabled; m2::PointD m_centerPtLonLat; int m_currentScale; @@ -99,6 +102,10 @@ public: void memoryWarning(); void drawMemoryWarning(DrawerYG * pDrawer); + void enablePlacemark(bool doEnable); + void setPlacemarkPosition(m2::PointD const & glbPt); + void drawPlacemark(DrawerYG * pDrawer); + void enableBenchmarkInfo(bool doEnable); bool addBenchmarkInfo(string const & name, m2::RectD const & globalRect, double frameDuration); void drawBenchmarkInfo(DrawerYG * pDrawer);