-
Notifications
You must be signed in to change notification settings - Fork 35
Add single (“simple”) offline pack example [WIP] #12
Conversation
zoomLevel:13 | ||
animated:NO]; | ||
|
||
self.mapView.maximumZoomLevel = 16; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn’t strictly necessary for the example descend to the maximum zoom level. We could simply add a few to the current zoom level and set that as the upper bound.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you’re right, this isn’t a very realistic way to control the extent of the downloaded region. I’ll look at changing how the min/max zoom are set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The most realistic UI would be a range slider. There are many range slider pods on CocoaPods, but I don’t know that we want to introduce that kind of dependency into an example. Maybe just a comment to the effect of “how cool would it be to use a range slider here!”
Swift notes from converting https://www.mapbox.com/help/mobile-offline/:
|
Whoops, thanks for catching that copy-pasta! |
Fixes #11. After some futzing around with KVO, this example is essentially the current offline doc with a progress bar. I left in the not-strictly necessary MGLOfflinePack error notifications because it seems like the friendly thing to do.
To-do:
startOfflinePackDownload
call later Downloading an offline pack blocks the visible map from loading mapbox-gl-native#4414.Notes:
/cc @1ec5