[ios] Correct download map call.

This commit is contained in:
vng 2015-03-31 16:51:46 +03:00 committed by Alex Zolotarev
parent 24e19dd399
commit 67d9035251

View file

@ -285,9 +285,11 @@ typedef void (^CompletionHandler)(UIBackgroundFetchResult);
- (void)downloadCountryWithIndex:(TIndex)index
{
//TODO: zoom in to country correctly to show download progress
/// @todo Fix this logic after Framework -> CountryTree -> ActiveMapLayout refactoring.
/// Call download via Framework.
Framework & f = GetFramework();
f.DownloadCountry(index, TMapOptions::EMapOnly);
f.GetCountryTree().GetActiveMapLayout().DownloadMap(index, TMapOptions::EMapOnly);
m2::RectD const rect = f.GetCountryBounds(index);
double const lon = MercatorBounds::XToLon(rect.Center().x);
double const lat = MercatorBounds::YToLat(rect.Center().y);