MCPcopy Create free account
hub / github.com/comaps/comaps / OnCountryFileDownloaded

Method OnCountryFileDownloaded

libs/map/framework.cpp:438–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438void Framework::OnCountryFileDownloaded(storage::CountryId const &, storage::LocalFilePtr const localFile)
439{
440 // Soft reset to signal that mwm file may be out of date in routing caches.
441 m_routingManager.ResetRoutingSession();
442
443 m2::RectD rect = mercator::Bounds::FullRect();
444
445 if (localFile && localFile->OnDisk(MapFileType::Map))
446 {
447 auto const res = RegisterMap(*localFile);
448 MwmSet::MwmId const & id = res.first;
449 if (id.IsAlive())
450 rect = id.GetInfo()->m_bordersRect;
451 }
452
453 m_trafficManager.Invalidate();
454 m_transitManager.Invalidate();
455 m_isolinesManager.Invalidate();
456
457 InvalidateRect(rect);
458 GetSearchAPI().ClearCaches();
459}
460
461bool Framework::OnCountryFileDelete(storage::CountryId const & countryId, storage::LocalFilePtr const localFile)
462{

Callers

nothing calls this directly

Calls 6

ResetRoutingSessionMethod · 0.80
OnDiskMethod · 0.80
IsAliveMethod · 0.45
GetInfoMethod · 0.45
InvalidateMethod · 0.45
ClearCachesMethod · 0.45

Tested by

no test coverage detected