MBMOfflineManager
@interface MBMOfflineManager : NSObject
An offline manager
manages downloads and storage for style packages and also produces tileset descriptors for the tile store
.
All the asynchronous methods calls complete even if the offline manager
instance gets out of scope before.
-
Construct a new
offline manager
.Declaration
Objective-C
- (nonnull instancetype)init;
Swift
init()
-
Construct a new
tileset descriptor
for thetile store
.Tileset descriptors are used by the
tile store
to create new offline regions. Resolving the created tileset descriptor includes loading and parsing the style and might include creation or update of a style package - depending on the given options.Declaration
Objective-C
- (nonnull MBXTilesetDescriptor *) createTilesetDescriptorForTilesetDescriptorOptions: (nonnull MBMTilesetDescriptorOptions *)tilesetDescriptorOptions;
Swift
func createTilesetDescriptor(for tilesetDescriptorOptions: MBMTilesetDescriptorOptions) -> MBXTilesetDescriptor
Parameters
tilesetDescriptorOptions
The
tileset descriptor options
to manage.Return Value
A new
tileset descriptor
. -
Removes a style package.
Removes a style package from the existing packages list. The actual resources eviction from the Tile Store might be deferred (see the Tile Store disk quota API).
All pending loading operations for the style package with the given id will fail with
Canceled
error.Declaration
Objective-C
- (void)removeStylePackForStyleURI:(nonnull NSString *)styleURI;
Swift
func removeStylePack(forStyleURI styleURI: String)
Parameters
styleURI
The URI of the style package’s associated style
-
Undocumented
Declaration
Objective-C
- (nonnull id<MBXCancelable>)loadStylePackForStyleURI:(nonnull NSString *)styleURI loadOptions:(nonnull MBMStylePackLoadOptions *)loadOptions onProgress:(nonnull MBMStylePackLoadProgressCallback)onProgress onFinished:(nonnull MBMStylePackCallback)onFinished __attribute((ns_returns_retained)) NS_REFINED_FOR_SWIFT;
-
Undocumented
Declaration
Objective-C
- (nonnull id<MBXCancelable>)loadStylePackForStyleURI:(nonnull NSString *)styleURI loadOptions:(nonnull MBMStylePackLoadOptions *)loadOptions onFinished:(nonnull MBMStylePackCallback)onFinished __attribute((ns_returns_retained)) NS_REFINED_FOR_SWIFT;
-
Undocumented
Declaration
Objective-C
- (void)getAllStylePacksForCallback:(nonnull MBMStylePacksCallback)callback NS_REFINED_FOR_SWIFT;
-
Undocumented
Declaration
Objective-C
- (void)getStylePackForStyleURI:(nonnull NSString *)styleURI callback:(nonnull MBMStylePackCallback)callback NS_REFINED_FOR_SWIFT;
-
Undocumented
Declaration
Objective-C
- (void)getStylePackMetadataForStyleURI:(nonnull NSString *)styleURI callback:(nonnull MBMStylePackMetadataCallback)callback NS_REFINED_FOR_SWIFT;
-
Undocumented
Declaration
Objective-C
- (void)removeStylePackForStyleURI:(nonnull NSString *)styleURI callback:(nonnull MBMStylePackCallback)callback NS_REFINED_FOR_SWIFT;