This repository was archived by the owner on May 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Not downloading all the needed tiles in beginBackgroundCacheForTileSource:southWest:northEast:minZoom:maxZoom: #656
Copy link
Copy link
Open
Description
I set up mapView and download tiles as in the example https://github.com/mapbox/mapbox-ios-sdk-offline
float maxDownloadZoom = 19.0;
float minDownloadZoom = 12.0;
mapView = [[RMMapView alloc] initWithFrame:self.view.bounds andTilesource:tileSource];
mapView.showsUserLocation = NO;
mapView.zoom = 15.5f;
mapView.maxZoom = maxDownloadZoom;
// center the map to the coordinates
CLLocationCoordinate2D center = CLLocationCoordinate2DMake(59.93248,30.33656);
mapView.centerCoordinate = center;
mapView.clusteringEnabled = NO;
// make map expand to fill screen when rotated
mapView.autoresizingMask = UIViewAutoresizingFlexibleHeight |
UIViewAutoresizingFlexibleWidth;
CLLocationCoordinate2D southWest = CLLocationCoordinate2DMake(59.928656913601245,30.327072143554688);
CLLocationCoordinate2D northEast = CLLocationCoordinate2DMake(59.93753684933923, 30.34977436065674);
[mapView setConstraintsSouthWest:southWest northEast:northEast];
RMTileCache *cache = [[RMTileCache alloc] initWithExpiryPeriod:0]; // never expires
mapView.tileCache = cache;
mapView.delegate = self;
then I download tiles in cache:
[mapView removeAllCachedImages];
mapView.tileCache.backgroundCacheDelegate = self;
[mapView.tileCache beginBackgroundCacheForTileSource:mapView.tileSource
southWest:southWest
northEast:northEast
minZoom:minDownloadZoom
maxZoom:maxDownloadZoom];
Then I stop my App, turn Airplane mode and run my App again. The result is that not all the tiles are shown on map, different tiles missing in different zoom-s.
I use a 1.6.0 version with #581 fix cherry-picked.
Metadata
Metadata
Assignees
Labels
No labels