From de92bcb68e0bdaf631e7338fa84e1e7e838b28f3 Mon Sep 17 00:00:00 2001 From: vng Date: Thu, 11 Oct 2012 21:52:33 +0300 Subject: [PATCH] Framework::GetAddressInfo input point should be in screen coordinates. --- map/address_finder.cpp | 5 ++++- map/framework.hpp | 3 +-- qt/draw_widget.cpp | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/map/address_finder.cpp b/map/address_finder.cpp index 5c829db461..4b2c9d8be0 100644 --- a/map/address_finder.cpp +++ b/map/address_finder.cpp @@ -469,8 +469,11 @@ namespace } } -void Framework::GetAddressInfo(m2::PointD const & pt, AddressInfo & info) const +void Framework::GetAddressInfo(m2::PointD const & pxPoint, AddressInfo & info) const { + // Input point is in pixel coordinates. + m2::PointD const pt = PtoG(pxPoint); + info.Clear(); info.m_country = GetCountryName(pt); diff --git a/map/framework.hpp b/map/framework.hpp index 4f19dbfdb9..096406e35b 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -298,8 +298,7 @@ public: }; /// Get address information for point on map. - /// @param[in] pt Point in mercator coordinates. - void GetAddressInfo(m2::PointD const & pt, AddressInfo & info) const; + void GetAddressInfo(m2::PointD const & pxPoint, AddressInfo & info) const; private: void GetAddressInfo(FeatureType const & ft, m2::PointD const & pt, AddressInfo & info) const; diff --git a/qt/draw_widget.cpp b/qt/draw_widget.cpp index 61878ec8d4..bd02a1bc61 100644 --- a/qt/draw_widget.cpp +++ b/qt/draw_widget.cpp @@ -353,7 +353,7 @@ namespace qt } else { - m_framework->GetAddressInfo(m_framework->PtoG(pt), info); + m_framework->GetAddressInfo(pt, info); } // Get feature types under cursor.