MapStyleContext
Objective-C
@interface MapStyleContext : NSObject
Swift
class MapStyleContext : NSObject
This class handles the map styles.
-
Check if the online map styles content is preloaded. @details If the content is not cached locally a call to preloadContentWithCompletionHandler must be performed.
Declaration
Objective-C
- (BOOL)isContentPreloaded;
Swift
func isContentPreloaded() -> Bool
-
Preload the online map styles content.
Declaration
Objective-C
- (void)preloadContentWithCompletionHandler:(nonnull void (^)(BOOL))handler;
Swift
func preloadContent() async -> Bool
-
Returns the local map styles list.
Declaration
Objective-C
- (nonnull NSArray<ContentStoreObject *> *)getLocalList;
Swift
func getLocalList() -> [ContentStoreObject]
-
Asynchronously returns the online map styles list. @details A preload operation is done if previously was not requested.
Declaration
Objective-C
- (void)getOnlineListWithCompletionHandler: (nonnull void (^)(NSArray<ContentStoreObject *> *_Nonnull))handler;
Swift
func onlineList() async -> [ContentStoreObject]
-
Start a download request for the given map style identifier.
Declaration
Objective-C
- (void)downloadStyleWithIdentifier:(NSInteger)identifier allowCellularNetwork:(BOOL)allowCellularNetwork completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func downloadStyle(withIdentifier identifier: Int, allowCellularNetwork: Bool) async -> Bool
Parameters
identifier
The style identifier.
allowCellularNetwork
The flag whether to allow charged networks.
handler
The block to execute asynchronously with the result.
-
Check if there is an update available.
Declaration
Objective-C
- (void)checkForUpdateWithCompletionHandler: (nonnull void (^)(ContentStoreOnlineSupportStatus))handler;
Swift
func checkForUpdate() async -> ContentStoreOnlineSupportStatus
Parameters
handler
The block to execute asynchronously with the content online support status.
-
Returns the update size string formatted ( if an update is available ).
Declaration
Objective-C
- (nonnull NSString *)getUpdateSizeFormatted;
Swift
func getUpdateSizeFormatted() -> String
-
The delegate for the content update.
Declaration
Objective-C
@property (nonatomic, weak) NSObject<ContentUpdateDelegate> *_Nullable delegateUpdate;
Swift
weak var delegateUpdate: (any ContentUpdateDelegate)? { get set }
-
Start the update process.
Declaration
Objective-C
- (void)updateWithAllowCellularNetwork:(BOOL)allowCellularNetwork completionHandler:(nonnull void (^)(BOOL))handler;
Swift
func update(withAllowCellularNetwork allowCellularNetwork: Bool) async -> Bool
Parameters
allowCellularNetwork
The flag whether to allow charged networks.
handler
The block to execute asynchronously with the result.
-
Returns the content items list in update process.
Declaration
Objective-C
- (nonnull NSArray<ContentStoreObject *> *)getUpdateItems;
Swift
func getUpdateItems() -> [ContentStoreObject]
-
Returns the update operation status.
Declaration
Objective-C
- (ContentUpdateStatus)getUpdateStatus;
Swift
func getUpdateStatus() -> ContentUpdateStatus
-
Returns the update operation progress.
Declaration
Objective-C
- (NSInteger)getUpdateProgress;
Swift
func getUpdateProgress() -> Int
-
Returns true if an update is already started.
Declaration
Objective-C
- (BOOL)isUpdateStarted;
Swift
func isUpdateStarted() -> Bool
-
Cancel the update process.
Declaration
Objective-C
- (void)cancelUpdate;
Swift
func cancelUpdate()
-
Returns the item having the specified ID.
Declaration
Objective-C
- (nullable ContentStoreObject *)getItemById:(NSInteger)contentId;
Swift
func getItemById(_ contentId: Int) -> ContentStoreObject?
-
Refresh content store.
Declaration
Objective-C
- (void)refreshContentStore;
Swift
func refreshContentStore()