Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2012-03-12 18:49:09 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:36:39 +0300
commit15e0cc25f43ff8759963b014aa7bfa7dc1dbfff2 (patch)
tree40495d1683ec5f114eea20b74cf4a4bf00060126 /map/feature_vec_model.cpp
parent1b9528da6a39d2f4747be8984b3b1405d4a777bd (diff)
[search] Zoom to 9 level, when no any country loaded under serch result.
Diffstat (limited to 'map/feature_vec_model.cpp')
-rw-r--r--map/feature_vec_model.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/map/feature_vec_model.cpp b/map/feature_vec_model.cpp
index 16e736f97e..02bdd2a81a 100644
--- a/map/feature_vec_model.cpp
+++ b/map/feature_vec_model.cpp
@@ -69,6 +69,21 @@ void FeaturesFetcher::ClearCaches()
m_multiIndex.ClearCache();
}
+bool FeaturesFetcher::IsCountryLoaded(m2::PointD const & pt) const
+{
+ vector<MwmInfo> info;
+ m_multiIndex.GetMwmInfo(info);
+
+ for (size_t i = 0; i < info.size(); ++i)
+ if (info[i].isValid() && info[i].isCountry() &&
+ info[i].m_limitRect.IsPointInside(pt))
+ {
+ return true;
+ }
+
+ return false;
+}
+
m2::RectD FeaturesFetcher::GetWorldRect() const
{
if (m_rect == m2::RectD())