diff options
author | vng <viktor.govako@gmail.com> | 2012-07-09 01:49:35 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:40:44 +0300 |
commit | c4c866b1dea0e1205e9da45a0eb7c7d290dcaffb (patch) | |
tree | 220f707849b0a18c5c9e0829d236656a21feecc9 /map/feature_vec_model.cpp | |
parent | 5f04609fff0976ad1e45902beefd8b8bef93beaa (diff) |
Refactoring of maps update after downloading:
- Delay maps deleting and updating if mwm is busy;
- Fix bugs with different mwm maps status;
- Add better function for country bounds;
- Simplify Storage logic;
Diffstat (limited to 'map/feature_vec_model.cpp')
-rw-r--r-- | map/feature_vec_model.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/map/feature_vec_model.cpp b/map/feature_vec_model.cpp index 875ae178d0..9dd8e52455 100644 --- a/map/feature_vec_model.cpp +++ b/map/feature_vec_model.cpp @@ -53,9 +53,19 @@ int FeaturesFetcher::AddMap(string const & file) return version; } -void FeaturesFetcher::RemoveMap(string const & fName) +void FeaturesFetcher::RemoveMap(string const & file) { - m_multiIndex.Remove(fName); + m_multiIndex.Remove(file); +} + +bool FeaturesFetcher::DeleteMap(string const & file) +{ + return m_multiIndex.DeleteMap(file); +} + +bool FeaturesFetcher::UpdateMap(string const & file, m2::RectD & rect) +{ + return m_multiIndex.UpdateMap(file, rect); } void FeaturesFetcher::RemoveAllCountries() @@ -74,13 +84,14 @@ void FeaturesFetcher::ClearCaches() m_multiIndex.ClearCache(); } -bool FeaturesFetcher::IsCountryLoaded(m2::PointD const & pt) const +/* +bool FeaturesFetcher::IsLoaded(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() && + if (info[i].IsExist() && info[i].IsCountry() && info[i].m_limitRect.IsPointInside(pt)) { return true; @@ -88,6 +99,7 @@ bool FeaturesFetcher::IsCountryLoaded(m2::PointD const & pt) const return false; } +*/ m2::RectD FeaturesFetcher::GetWorldRect() const { |