MBMOfflineRegionManager
Deprecated
@interface MBMOfflineRegionManager : NSObject
The offline region manager
that manages offline packs. All of the class’s instance methods are asynchronous
reflecting the fact that offline resources are stored in a database. The offline manager maintains a canonical
collection of offline packs.
-
Unavailable
Undocumented
Declaration
Objective-C
- (nonnull instancetype)init NS_UNAVAILABLE;
-
Unavailable
Undocumented
Declaration
Objective-C
+ (nonnull instancetype)new NS_UNAVAILABLE;
-
Construct a new offline manager.
Declaration
Objective-C
- (nonnull instancetype)initWithResourceOptions: (nonnull MBMResourceOptions *)resourceOptions;
Swift
init(resourceOptions: MBMResourceOptions)
Parameters
resourceOptions
the
resource options
to manage. -
Sets the maximum number of Mapbox-hosted tiles that may be downloaded and stored on the current device.
By default, the limit is set to 6,000. Once this limit is reached,
OfflineRegionObserver.mapboxTileCountLimitExceeded()
fires every additional attempt to download additional tiles until already downloaded tiles are removed by callingOfflineRegion.purge()
API.Declaration
Objective-C
- (void)setOfflineMapboxTileCountLimitForLimit:(uint64_t)limit;
Swift
func setOfflineMapboxTileCountLimitForLimit(_ limit: UInt64)
Parameters
limit
the maximum number of tiles allowed to be downloaded
-
Undocumented
Declaration
Objective-C
- (void)getOfflineRegionsForCallback:(nonnull MBMOfflineRegionCallback)callback;
Swift
func getOfflineRegions(forCallback callback: @escaping OfflineRegionCallback)
-
Undocumented
Declaration
Objective-C
- (void)createOfflineRegionForGeometryDefinition:(nonnull MBMOfflineRegionGeometryDefinition *)geometryDefinition callback:(nonnull MBMOfflineRegionCreateCallback)callback;
Swift
func createOfflineRegion(for geometryDefinition: MBMOfflineRegionGeometryDefinition, callback: @escaping OfflineRegionCreateCallback)
-
Undocumented
Declaration
Objective-C
- (void)createOfflineRegionForTilePyramidDefinition:(nonnull MBMOfflineRegionTilePyramidDefinition *)tilePyramidDefinition callback:(nonnull MBMOfflineRegionCreateCallback)callback;
Swift
func createOfflineRegion(for tilePyramidDefinition: MBMOfflineRegionTilePyramidDefinition, callback: @escaping OfflineRegionCreateCallback)
-
Undocumented
Declaration
Objective-C
- (void)mergeOfflineDatabaseForFilePath:(nonnull NSString *)filePath callback:(nonnull MBMOfflineDatabaseMergeCallback)callback;
Swift
func mergeOfflineDatabase(forFilePath filePath: String, callback: @escaping OfflineDatabaseMergeCallback)