DEPRECATED-mapbox-ios-sdk icon indicating copy to clipboard operation
DEPRECATED-mapbox-ios-sdk copied to clipboard

RMMapView assign RMDatabaseCache with files at MBXOfflineMapDatabase path

Open paperview opened this issue 10 years ago • 2 comments

First of all, I'm wondering if this would even work in principal.

In the

- (void)offlineMapDownloader:(MBXOfflineMapDownloader *)offlineMapDownloader didCompleteOfflineMapDatabase:(MBXOfflineMapDatabase *)offlineMapDatabase withError:(NSError *)error

method I am trying to assign tiles I downloaded for a certain region to my RMMapView's tile cache, so that it will use those tiles when offline. I'm doing something like this

RMDatabaseCache *cache = [[RMDatabaseCache alloc] initWithDatabase:offlineMapDatabase.path];

and then I need to assign that to self.mapView.tileCache

I can't figure out how to do this.

paperview avatar Nov 26 '14 19:11 paperview

I want to continue using RMMapView from the mapbox-ios-sdk instead of useing MKMapView for the ease of drawing the LineStrings I have in my map in the - (RMMapLayer *)mapView:(RMMapView *)mapView layerForAnnotation:(RMAnnotation *)annotation delegate method

paperview avatar Nov 26 '14 19:11 paperview

The answer may be as simple as [self.mapView.tileCache addCache:cache] still finding out if this will actually work.

paperview avatar Nov 26 '14 19:11 paperview