forked from organicmaps/organicmaps-tmp
Using only real maps while checking diffs.
This commit is contained in:
parent
49d984f25c
commit
6136e29e54
2 changed files with 9 additions and 6 deletions
|
@ -1484,14 +1484,17 @@ void Storage::LoadDiffScheme()
|
|||
diffs::LocalMapsInfo localMapsInfo;
|
||||
auto const currentVersion = GetCurrentDataVersion();
|
||||
localMapsInfo.m_currentDataVersion = currentVersion;
|
||||
vector<TLocalFilePtr> localMaps;
|
||||
GetLocalMaps(localMaps);
|
||||
for (auto const & map : localMaps)
|
||||
|
||||
TCountriesVec localMaps;
|
||||
GetLocalRealMaps(localMaps);
|
||||
for (auto const & countryId : localMaps)
|
||||
{
|
||||
auto const mapVersion = map->GetVersion();
|
||||
auto const localFile = GetLatestLocalFile(countryId);
|
||||
auto const mapVersion = localFile->GetVersion();
|
||||
if (mapVersion != currentVersion && mapVersion > 0)
|
||||
localMapsInfo.m_localMaps.emplace(map->GetCountryName(), mapVersion);
|
||||
localMapsInfo.m_localMaps.emplace(localFile->GetCountryName(), mapVersion);
|
||||
}
|
||||
|
||||
m_diffManager.AddObserver(*this);
|
||||
m_diffManager.Load(move(localMapsInfo));
|
||||
}
|
||||
|
|
|
@ -460,7 +460,7 @@ public:
|
|||
//@}
|
||||
|
||||
/// \returns real (not fake) local maps contained in countries.txt.
|
||||
/// So this method does not return custom user local maps and World and WorldCoosts country id.
|
||||
/// So this method does not return custom user local maps and World and WorldCoasts country id.
|
||||
void GetLocalRealMaps(TCountriesVec & localMaps) const;
|
||||
|
||||
/// Do we have downloaded countries
|
||||
|
|
Loading…
Add table
Reference in a new issue