Skip to content
This repository has been archived by the owner on May 9, 2018. It is now read-only.

RMMapView assign RMDatabaseCache with files at MBXOfflineMapDatabase path #545

Open
paperview opened this issue Nov 26, 2014 · 2 comments
Open

Comments

@paperview
Copy link

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
Copy link
Author

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
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant