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 <SYMapInstaller.h>
|
(nonnull SYTask *) | - getAvailableCountries:completion: |
| 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 (updates included). If the installation progress should be reported, use the "mapinstaller_register_on_progress_callback" function to register it. If the notification about finished installation is needed, use the "mapinstaller_register_on_resumed_install_done_callback" function to register it. More...
|
|
(nonnull SYTask *) | - detectCurrentCountry:completion: |
| Detects the country of current location by IP address, or by ISO code of a region. More...
|
|
(nonnull SYTask *) | - installMap: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. More...
|
|
(nonnull SYTask *) | - uninstallMap:completion: |
| Uninstalls the requested map. More...
|
|
(void) | - getMapStatus:completion: |
| Fetches the status of requested map (country or region) asynchronously. More...
|
|
(void) | - loadMap:completion: |
| Loads installed map (country or region) asynchronously. More...
|
|
(void) | - unloadMap:completion: |
| Unloads loaded map asynchronously. More...
|
|
(void) | - loadMaps:completion: |
| Loads an array of installed maps (country or region) asynchronously. More...
|
|
(void) | - unloadMaps:completion: |
| Unloads an array of loaded maps asynchronously. More...
|
|
(nonnull SYTask *) | - checkForUpdatesWithCompletion: |
| Checks for map updates. More...
|
|
(nonnull SYTask *) | - updateMap: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. In case of successful update, the map will be loaded. More...
|
|
(void) | - getCountryDetails:installedOnly:completion: |
| Fetch details about a country asynchronously. More...
|
|
(void) | - getRegionDetails:installedOnly:completion: |
| Fetch details about a country region asynchronously. More...
|
|
(void) | - setLocale:completion: |
| Sets the locale of MapInstaller's data (the MapLists). Fetches localized MapList from the API and translates local data. Returns SYMapInstallerResultUnsupportedLocale if desired locale is not supported by the maps API. All MapInstaller calls, which return some localized data (getCountryDetails, getRegionDetails, ...), called afterwards, will return localized content (if the locale is supported). More...
|
|
(void) | - clearCacheWithCompletion: |
| Clear the MapInstaller cache. Clearing the cache will fetch the most recent data (MapList) from the MapsAPI. More...
|
|
Provides methods which facilitate usage of offline map data capabilities. Some calls made to SYMapLoader are asynchronous and return results through the SYMapLoaderDelegate protocol.
◆ getAvailableCountries:completion:
- (nonnull SYTask*) getAvailableCountries: |
|
(SYMapInstallerMapFilter) |
filter |
completion: |
|
(nonnull SYMapInstallerMapArrayCompletionBlock) |
completion |
|
|
| |
Fetches available maps matching the requested filter. When finished, it calls the callback with the list of available map ISO codes.
- Parameters
-
filter | SYMapInstallerMapFilterAll - includes already installed maps and maps available for download SYMapInstallerMapFilterInstalled - includes only already installed maps |
completion | block used as a callback for this function |
- Returns
- SYTask cancelation object
◆ resumePendingInstallations:
- (void) resumePendingInstallations: |
|
(nonnull SYMapInstallerResumeInfoBlock) |
infoCallback |
|
Resumes all pending map installations (updates included). If the installation progress should be reported, use the "mapinstaller_register_on_progress_callback" function to register it. If the notification about finished installation is needed, use the "mapinstaller_register_on_resumed_install_done_callback" function to register it.
- Parameters
-
infoCallback | Block used as a callback for resume information. |
◆ detectCurrentCountry:completion:
- (nonnull SYTask*) detectCurrentCountry: |
|
(nullable NSString *) |
country |
completion: |
|
(nonnull SYMapInstallerOneMapCompletionBlock) |
completion |
|
|
| |
Detects the country of current location by IP address, or by ISO code of a region.
- Parameters
-
country | should be nil for detection current country by IP address. If provided ISO code of a region, ISO code of the whole country will be returned. |
completion | block is called after the detection process finishes, called with ISO code of the detected country. |
- Returns
- SYTask cancelation object
◆ installMap:completion:
- (nonnull SYTask*) installMap: |
|
(nonnull SYCountryIso *) |
map |
completion: |
|
(nonnull SYMapInstallerOneMapCompletionBlock) |
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
-
map | ISO code of map to be downloaded and installed. |
completion | block is called after the installation finishes, called with ISO code and installation result |
- Returns
- SYTask cancelation object
◆ uninstallMap:completion:
- (nonnull SYTask*) uninstallMap: |
|
(nonnull SYCountryIso *) |
map |
completion: |
|
(nonnull SYMapInstallerOneMapCompletionBlock) |
completion |
|
|
| |
Uninstalls the requested map.
- Parameters
-
map | ISO code of map to be uninstalled. |
completion | block is called after the completion of the uninstall process. Called with map ISO code and uninstall result. |
- Returns
- SYTask cancelation object
◆ getMapStatus:completion:
- (void) getMapStatus: |
|
(nonnull SYCountryIso *) |
map |
completion: |
|
(nonnull SYMapInstallerMapStatusCompletionBlock) |
completion |
|
|
| |
Fetches the status of requested map (country or region) asynchronously.
- Parameters
-
map | ISO code of the map. |
completion | block is called when the status is ready. Called with SYMapLoaderResult and SYMapLoaderMapStatus. |
◆ loadMap:completion:
- (void) loadMap: |
|
(nonnull SYCountryIso *) |
map |
completion: |
|
(nonnull SYMapInstallerResultCompletionBlock) |
completion |
|
|
| |
Loads installed map (country or region) asynchronously.
- Parameters
-
map | ISO code of the map to be loaded. |
completion | block is called after the map is loaded. Called with SYMapInstallerResult. |
◆ unloadMap:completion:
- (void) unloadMap: |
|
(nonnull SYCountryIso *) |
map |
completion: |
|
(nonnull SYMapInstallerResultCompletionBlock) |
completion |
|
|
| |
Unloads loaded map asynchronously.
- Parameters
-
map | ISO code of the map to be unloaded. |
completion | block is called after the map is unloaded. Called with SYMapInstallerResult. |
◆ loadMaps:completion:
- (void) loadMaps: |
|
(nonnull NSArray< SYCountryIso * > *) |
maps |
completion: |
|
(nonnull SYMapInstallerResultCompletionBlock) |
completion |
|
|
| |
Loads an array of installed maps (country or region) asynchronously.
- Parameters
-
maps | array of map ISO codes to be loaded. |
completion | block is called after the maps are loaded. Called with SYMapLoaderResult. |
◆ unloadMaps:completion:
- (void) unloadMaps: |
|
(nonnull NSArray< SYCountryIso * > *) |
maps |
completion: |
|
(nonnull SYMapInstallerResultCompletionBlock) |
completion |
|
|
| |
Unloads an array of loaded maps asynchronously.
- Parameters
-
maps | array of map ISO codes to be unloaded. |
completion | block is called after the maps are unloaded. Called with SYMapLoaderResult. |
◆ checkForUpdatesWithCompletion:
- (nonnull SYTask*) checkForUpdatesWithCompletion: |
|
(nonnull SYMapInstallerMapArrayCompletionBlock) |
completion |
|
Checks for map updates.
- Parameters
-
completion | block is called with the check result and list of ISO codes, representing the maps for which an update is available. |
- Returns
- SYTask cancelation object
◆ updateMap:completion:
- (nonnull SYTask*) updateMap: |
|
(nonnull SYCountryIso *) |
map |
completion: |
|
(nonnull SYMapInstallerOneMapCompletionBlock) |
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. In case of successful update, the map will be loaded.
- Parameters
-
map | ISO code of map, for which an update should be performed. |
completion | block is called after the update is complete, called with ISO code of the map and status. |
- Returns
- SYTask cancelation object
◆ getCountryDetails:installedOnly:completion:
- (void) getCountryDetails: |
|
(nonnull SYCountryIso *) |
map |
installedOnly: |
|
(BOOL) |
installed |
completion: |
|
(nonnull SYMapInstallerCountryDetailsCompletionBlock) |
completion |
|
|
| |
Fetch details about a country asynchronously.
- Parameters
-
map | ISO code of the requested country. |
completion | block is called when the details are ready. Called with SYMapInstallerResult and SYCountryDetails. |
◆ getRegionDetails:installedOnly:completion:
- (void) getRegionDetails: |
|
(nonnull SYCountryIso *) |
map |
installedOnly: |
|
(BOOL) |
installed |
completion: |
|
(nonnull SYMapInstallerRegionDetailsCompletionBlock) |
completion |
|
|
| |
Fetch details about a country region asynchronously.
- Parameters
-
map | ISO code of the requested region. |
completion | block is called when the details are ready. Called with SYMapInstallerResult and SYRegionDetails. |
◆ setLocale:completion:
- (void) setLocale: |
|
(nonnull NSString *) |
locale |
completion: |
|
(nonnull SYMapInstallerResultCompletionBlock) |
completion |
|
|
| |
Sets the locale of MapInstaller's data (the MapLists). Fetches localized MapList from the API and translates local data. Returns SYMapInstallerResultUnsupportedLocale if desired locale is not supported by the maps API. All MapInstaller calls, which return some localized data (getCountryDetails, getRegionDetails, ...), called afterwards, will return localized content (if the locale is supported).
- Parameters
-
locale | BCP 47 language tag, containing the desired locale of the content. |
completion | block is called after setting locale is processed. Called with SYMapLoaderResult. |
◆ clearCacheWithCompletion:
- (void) clearCacheWithCompletion: |
|
(nonnull SYMapInstallerResultCompletionBlock) |
completion |
|
Clear the MapInstaller cache. Clearing the cache will fetch the most recent data (MapList) from the MapsAPI.
- Parameters
-
completion | Block that is called when the cache is cleared. |
◆ delegate
The documentation for this class was generated from the following file: