diff options
author | vng <viktor.govako@gmail.com> | 2015-12-23 19:33:05 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:03:17 +0300 |
commit | f6ac3786d755afde9534b28e9a1977e38b3aa470 (patch) | |
tree | 239acb986e517ef84c31d4991a37df7f6d3bc4c1 /map/address_finder.cpp | |
parent | 8c57791e1d87fa500b3f7bb1b13f45282edc0cf1 (diff) |
Refactored some geometry functions.
Correct implementation of feature::GetMinDistanceMeters().
Diffstat (limited to 'map/address_finder.cpp')
-rw-r--r-- | map/address_finder.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/map/address_finder.cpp b/map/address_finder.cpp index c42b291210..e872375de5 100644 --- a/map/address_finder.cpp +++ b/map/address_finder.cpp @@ -6,6 +6,7 @@ #include "drape_frontend/visual_params.hpp" #include "indexer/classificator.hpp" +#include "indexer/feature_algo.hpp" #include "indexer/feature_visibility.hpp" #include "platform/preferred_languages.hpp" @@ -96,7 +97,8 @@ namespace feature::TypesHolder types(f); if (!types.Has(m_coastType) && NeedProcess(types)) { - double const d = f.GetDistance(m_pt, m_scale); + // Convert from meters to degrees for backward compatibility. + double const d = feature::GetMinDistanceMeters(f, m_pt, m_scale) * MercatorBounds::degreeInMetres; ASSERT_GREATER_OR_EQUAL(d, 0.0, ()); if (IsInclude(d, types)) |