MBMOfflineManager
@interface MBMOfflineManager : NSObject
OfflineManager manages downloads and storage for style packages and also produces tileset descriptors for the TileStore.
All the asynchronous methods calls complete even if the OfflineManager
instance gets out of scope before.
-
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.
-
Construct a new TilesetDescriptor for the TileStore
Tileset descriptors are used by the TileStore 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 resource options to manage.
Return Value
Returns a new tileset descriptor
-
Removes a style package.
Removes a style package from the existing packages list. The actual resources eviction might be deferred. 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 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 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;