SYMapLoader Class Reference

Provides methods which facilitate usage of offline map data capabilities. Some calls made to SYMapLoader are asynchronous and return results through the SYMapLoaderDelegate protocol. More...

#import <SYMapLoader.h>

Inheritance diagram for SYMapLoader:
Collaboration diagram for SYMapLoader:

Instance Methods

(nonnull SYTask *) - getAvailableCountries:withCompletion:
 Fetches available maps matching the requested filter. When finished, it calls the callback with the list of available map ISO codes. More...
 
(void) - resumePendingInstallations
 Resumes all pending map installations. If the installation progress should be reported, use the "maploader_register_on_progress_callback" function to register it. If the notification about finished installation is needed, use the "maploader_register_on_resumed_install_done_callback" function to register it. More...
 
(nonnull SYTask *) - detectCurrentCountry:withCompletion:
 Detects the country of current location. More...
 
(nonnull SYTask *) - installMap:withCompletion:
 Downloads and installs the requested map. If the installation progress should be reported, use the "maploader_register_on_progress_callback" function to register it. More...
 
(nonnull SYTask *) - uninstallMap:withCompletion:
 Uninstalls the requested map. More...
 
(SYMapLoaderMapStatus) - getMapStatus:
 Fetches the status of requested map(country or region). More...
 
(SYMapLoaderResult) - loadMap:
 Loads installed map(country or region). More...
 
(SYMapLoaderResult) - unloadMap:
 Unloads loaded map. More...
 
(nonnull SYTask *) - checkForUpdatesWithCompletion:
 Checks for map updates. More...
 
(nonnull SYTask *) - updateMap:withCompletion:
 Updates map with given ISO code. If the update progress should be reported, use the "maploader_register_on_progress_callback" function to register it. More...
 
(nullable SYCountryDetails *) - getCountryDetails:installedOnly:withResult:
 Fetch details about a country. More...
 
(nullable SYRegionDetails *) - getRegionDetails:installedOnly:withResult:
 Fetch details about a country region. More...
 

Class Methods

(SYMapLoaderMapStatus) + convertLoaderStatus: [implementation]
 
(SYMapLoaderResult) + convertLoaderResult: [implementation]
 
(nonnull NSString *) + stringFromUtf8: [implementation]
 

Properties

id< SYMapLoaderDelegatedelegate
 Current SYMapLoaderDelegate. More...
 

Detailed Description

Provides methods which facilitate usage of offline map data capabilities. Some calls made to SYMapLoader are asynchronous and return results through the SYMapLoaderDelegate protocol.

Method Documentation

◆ checkForUpdatesWithCompletion:()

- (nonnull SYTask*) checkForUpdatesWithCompletion: (nonnull SYMapLoaderMapArrayCompletionBlock)  completion

Checks for map updates.

Parameters
completionblock is called with the check result and list of ISO codes, representing the maps for which an update is available.
Returns
SYTask cancelation object

◆ convertLoaderResult:()

+ (SYMapLoaderResult) convertLoaderResult: (const sygm_maploader_result_e)  result
implementation

◆ convertLoaderStatus:()

+ (SYMapLoaderMapStatus) convertLoaderStatus: (const sygm_maploader_map_status_e)  status
implementation

◆ detectCurrentCountry:withCompletion:()

- (nonnull SYTask*) detectCurrentCountry: (nullable NSString *)  country
withCompletion: (nonnull SYMapLoaderOneMapCompletionBlock)  completion 

Detects the country of current location.

Parameters
countryOptional identifier of the country (e.g. "SVK"), pass an empty string in case no identifier should be used.
completionblock is called after the detection process finishes, called with ISO code of the detected country.
Returns
SYTask cancelation object

◆ getAvailableCountries:withCompletion:()

- (nonnull SYTask*) getAvailableCountries: (SYMapLoaderMapFilter)  filter
withCompletion: (nonnull SYMapLoaderMapArrayCompletionBlock)  completion 

Fetches available maps matching the requested filter. When finished, it calls the callback with the list of available map ISO codes.

Parameters
filterSYMapLoaderMapFilterAll - includes already installed maps and maps available for download SYMapLoaderMapFilterInstalled - includes only already installed maps
completionblock used as a callback for this function
Returns
SYTask cancelation object

◆ getCountryDetails:installedOnly:withResult:()

- (nullable SYCountryDetails*) getCountryDetails: (nonnull SYCountryIso *)  map
installedOnly: (BOOL)  installed
withResult: (nonnull SYMapLoaderResult *)  result 

Fetch details about a country.

Parameters
mapISO code of the requested country.
resultPointer to SYMapLoaderResult struct, where the operation result will be stored
Returns
SYCountryDetails value of country details

◆ getMapStatus:()

- (SYMapLoaderMapStatus) getMapStatus: (nonnull SYCountryIso *)  map

Fetches the status of requested map(country or region).

Parameters
mapISO code of the map.
Returns
SYMapLoaderMapStatus enum value.

◆ getRegionDetails:installedOnly:withResult:()

- (nullable SYRegionDetails*) getRegionDetails: (nonnull SYCountryIso *)  map
installedOnly: (BOOL)  installed
withResult: (nonnull SYMapLoaderResult *)  result 

Fetch details about a country region.

Parameters
mapISO code of the requested region.
resultPointer to SYMapLoaderResult struct, where the operation result will be stored
Returns
SYRegionDetails value of region details

◆ installMap:withCompletion:()

- (nonnull SYTask*) installMap: (nonnull SYCountryIso *)  map
withCompletion: (nonnull SYMapLoaderOneMapCompletionBlock)  completion 

Downloads and installs the requested map. If the installation progress should be reported, use the "maploader_register_on_progress_callback" function to register it.

Parameters
mapISO code of map to be downloaded and installed.
completionblock is called after the installation finishes, called with ISO code and installation result
Returns
SYTask cancelation object

◆ loadMap:()

- (SYMapLoaderResult) loadMap: (nonnull SYCountryIso *)  map

Loads installed map(country or region).

Parameters
mapISO code of the map to be loaded.
Returns
SYMapLoaderResult value indicating whether the load was successful

◆ resumePendingInstallations()

- (void) resumePendingInstallations

Resumes all pending map installations. If the installation progress should be reported, use the "maploader_register_on_progress_callback" function to register it. If the notification about finished installation is needed, use the "maploader_register_on_resumed_install_done_callback" function to register it.

◆ stringFromUtf8:()

+ (nonnull NSString*) stringFromUtf8: (nonnull const sygm_iso_t)  iso
implementation

◆ uninstallMap:withCompletion:()

- (nonnull SYTask*) uninstallMap: (nonnull SYCountryIso *)  map
withCompletion: (nonnull SYMapLoaderOneMapCompletionBlock)  completion 

Uninstalls the requested map.

Parameters
mapISO code of map to be uninstalled.
completionblock is called after the completion of the uninstall process. Called with map ISO code and uninstall result.
Returns
SYTask cancelation object

◆ unloadMap:()

- (SYMapLoaderResult) unloadMap: (nonnull SYCountryIso *)  map

Unloads loaded map.

Parameters
mapISO code of the map to be unloaded.
Returns
maploader_result_e value indicating whether the unload was successful

◆ updateMap:withCompletion:()

- (nonnull SYTask*) updateMap: (nonnull SYCountryIso *)  map
withCompletion: (nonnull SYMapLoaderOneMapCompletionBlock)  completion 

Updates map with given ISO code. If the update progress should be reported, use the "maploader_register_on_progress_callback" function to register it.

Parameters
mapISO code of map, for which an update should be performed.
completionblock is called after the update is complete, called with ISO code of the map and status.
Returns
SYTask cancelation object

Property Documentation

◆ delegate

- (id<SYMapLoaderDelegate>) delegate
readwritenonatomicweak

The documentation for this class was generated from the following file: