-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Support for Offline Tilesets? #9997
Comments
Do you have any success on this? I have similar task, many custom tilesets should be downloaded for offline. |
Hi, thanks for using Mapbox. For "how do I" questions like this, please refer to our help documentation, and if you can't find the answer there, contact support. This issue tracker is for reporting bugs and feature requests. Thank you! |
jfirebaugh can you please point me to the article in your help documentation that explains how to download raster tile sets from non mapbox sources so they can be used offline? |
@jfirebaugh I would also like to know the location of any "how to" documentation or whether this is possible on Mapbox? Can't seem to find anything on your site explaining how to download raster tiles from a non-mapbox style url. |
If anyone comes across this and is still interested please read on. You need to create a Mapbox style.json file manually with your raster tile-set URL as a source and corresponding layer included. After this upload it somewhere online (S3 for example) and use the URL in the MGLTilePyramidOfflineRegion(styleURL:URL! etc...) initialization call. You can even apply this url to the mapview as it's style url which is pretty neat. |
I used mbtiles for my project using legacy mapbox ios sdk (1.6.1).
Now with this new gl version, I have to use "Offline pack" to store map tiles locally. I also uploaded a tileset from old mbtiles and add it to a new style.
Unfortunately, as stated in #8174 , map data is only downloaded in base style. Tileset data is not downloaded along, so without network connection it's unavailable. jfirebaugh said that we could download offline data with an auxiliary style including just that tileset source and nitrag said that he was able to do this but I couldn't download the pack.
I tried:
NSURL *styleURL = [NSURL URLWithString:@"mapbox://styles/myUsername/myStyleHash"];
-> download base style only, show tileset correctly when online, but got error when offline, got "[Setup]: loading style failed: The request timed out".
NSURL *styleURL = [[NSBundle mainBundle] URLForResource:@"mapbox-raster-v8" withExtension:@"json"];
-> got "response class is not NSHTTPURLResponse" at "offlinePackDidReceiveError:" with 0 of 1 resource when downloading.
create a blank style, turn off compositing, add the tileset as the only layer as nitrag said
-> no success.
The text was updated successfully, but these errors were encountered: