SYCustomPlacesManager Class Reference

Provides custom places operations. The purpose is to manage custom places: usiing of offline places or online places mode, installation and unistallation of offline places. Online places are stored in online services and loaded when they are shown on a map view. Offline places are downloaded from online services and stored in device in advance, so they can be shown also when device is offline. More...

#import <SYCustomPlacesManager.h>

Inheritance diagram for SYCustomPlacesManager:
Collaboration diagram for SYCustomPlacesManager:

Instance Methods

((unavailable("Use +[SYCustomPlacesManager sharedManager] instead.") - __attribute__
 SYCustomPlacesManager is singleton, use [SYCustomPlacesManager sharedManager] to access singleton instance. More...
 
(void) - getInstalledDatasetsWithSource:completion:
 Asynchronously get info about installed custom places datasets. More...
 
(nonnull SYTask *) - installOfflinePlacesFromDatasets:forCountry:progress:completion:
 Downloads and installs offline places datasets for specific country (or for all countries if country parameter is nil). More...
 
(void) - installOfflinePlacesFromJson:completion:
 Installs Offline Places from provided JSON string. More...
 
(void) - installCategoriesFromJson:completion:
 Installs Custom Places Categories from provided JSON string. More...
 
(void) - uninstallOfflinePlacesFromDatasets:forCountry:completion:
 Uninstalls offline places from specified datasets for the requested country. More...
 
(void) - uninstallOfflinePlacesForCountry:completion:
 Uninstalls offline places of the requested country. More...
 
(nonnull SYTask *) - updateInstalledPlacesWithProgress:completion:
 Downloads and installs updates for offline places of all installed countries. More...
 
(void) - getActiveDatasetIdsWithCompletion:
 Get active custom places datasets. Only places from active datasets are visible on map and can be found using SYCustomPlacesSearch. More...
 
(void) - setActiveDatasetIds:completion:
 Set active custom places datasets. Only places from active datasets are visible on map and can be found using SYCustomPlacesSearch. More...
 

Class Methods

(nullable SYCustomPlacesManager *) + sharedManager
 Returns SYCustomPlacesManager singleton instance (or nil if SygicMaps SDK is not initialized). More...
 
((unavailable("Use +[SYCustomPlacesManager sharedManager] instead.") + __attribute__
 

Properties

SYCustomPlacesMode mode
 Custom places mode: Online or Offline. More...
 
id< SYCustomPlacesManagerDelegatedelegate
 Current delegate which gets notifications about changes of SYCustomPlacesManager state. More...
 
NSString * defaultDatasetId
 ID of the default custom places dataset. More...
 

Detailed Description

Provides custom places operations. The purpose is to manage custom places: usiing of offline places or online places mode, installation and unistallation of offline places. Online places are stored in online services and loaded when they are shown on a map view. Offline places are downloaded from online services and stored in device in advance, so they can be shown also when device is offline.

Method Documentation

◆ sharedManager

+ (nullable SYCustomPlacesManager*) sharedManager

Returns SYCustomPlacesManager singleton instance (or nil if SygicMaps SDK is not initialized).

◆ __attribute__ [1/2]

- ((unavailable("Use +[SYCustomPlacesManager sharedManager] instead.") __attribute__

SYCustomPlacesManager is singleton, use [SYCustomPlacesManager sharedManager] to access singleton instance.

◆ __attribute__ [2/2]

+ ((unavailable("Use +[SYCustomPlacesManager sharedManager] instead.") __attribute__

◆ getInstalledDatasetsWithSource:completion:

- (void) getInstalledDatasetsWithSource: (SYCustomPlacesDatasetSource)  source
completion: (nonnull SYCustomPlacesInstalledDatasetsCompletionBlock)  completion 

Asynchronously get info about installed custom places datasets.

◆ installOfflinePlacesFromDatasets:forCountry:progress:completion:

- (nonnull SYTask*) installOfflinePlacesFromDatasets: (nonnull NSArray< NSString * > *)  datasets
forCountry: (nullable SYCountryIso *)  countryIso
progress: (nullable SYCustomPlacesInstallProgressBlock)  progress
completion: (nonnull SYCustomPlacesDefaultCompletionBlock)  completion 

Downloads and installs offline places datasets for specific country (or for all countries if country parameter is nil).

Parameters
datasetsarray of dataset IDs
countryIsocountry ISO of installed offline places. If country is nil, the whole datasets will be installed, without limitation to a country.
progressblock used as an optional callback for the progress of this function
completionblock used as a callback for the result of this function
Returns
SYTask cancelation object

◆ installOfflinePlacesFromJson:completion:

- (void) installOfflinePlacesFromJson: (nonnull NSString *)  json
completion: (nonnull SYCustomPlacesDefaultCompletionBlock)  completion 

Installs Offline Places from provided JSON string.

Parameters
jsonSerialized offline places which are to be installed, according to the schema in the documentation (https://developers.sygic.com/maps-sdk/configuration/custom_places_schema/).
completionblock used as a callback for the result of this function

◆ installCategoriesFromJson:completion:

- (void) installCategoriesFromJson: (nonnull NSString *)  json
completion: (nonnull SYCustomPlacesDefaultCompletionBlock)  completion 

Installs Custom Places Categories from provided JSON string.

Parameters
jsonSerialized categories which are to be installed, according to the schema in the documentation (https://developers.sygic.com/maps-sdk/configuration/custom_places_categories_schema/).
completionblock used as a callback for the result of this function

◆ uninstallOfflinePlacesFromDatasets:forCountry:completion:

- (void) uninstallOfflinePlacesFromDatasets: (nonnull NSArray< NSString * > *)  datasets
forCountry: (nullable SYCountryIso *)  countryIso
completion: (nonnull SYCustomPlacesDefaultCompletionBlock)  completion 

Uninstalls offline places from specified datasets for the requested country.

Parameters
datasetsarray of dataset IDs
countryIsocountry ISO of installed offline places. If country is nil, the whole datasets will be uninstalled, without limitation to a country.
completionblock used as a callback for this function

◆ uninstallOfflinePlacesForCountry:completion:

- (void) uninstallOfflinePlacesForCountry: (nonnull SYCountryIso *)  countryIso
completion: (nonnull SYCustomPlacesDefaultCompletionBlock)  completion 

Uninstalls offline places of the requested country.

Parameters
countryIsocountry ISO of installed offline places
completionblock used as a callback for this function

◆ updateInstalledPlacesWithProgress:completion:

- (nonnull SYTask*) updateInstalledPlacesWithProgress: (nullable SYCustomPlacesInstallProgressBlock)  progress
completion: (nonnull SYCustomPlacesDefaultCompletionBlock)  completion 

Downloads and installs updates for offline places of all installed countries.

Parameters
progressblock used as an optional callback for the progress of this function
completionblock used as a callback for the result of this function
Returns
SYTask cancelation object

◆ getActiveDatasetIdsWithCompletion:

- (void) getActiveDatasetIdsWithCompletion: (nonnull SYCustomPlacesGetActiveDatasetIdsCompletionBlock)  completion

Get active custom places datasets. Only places from active datasets are visible on map and can be found using SYCustomPlacesSearch.

◆ setActiveDatasetIds:completion:

- (void) setActiveDatasetIds: (nonnull NSArray< NSString * > *)  datasets
completion: (nonnull SYCustomPlacesDefaultCompletionBlock)  completion 

Set active custom places datasets. Only places from active datasets are visible on map and can be found using SYCustomPlacesSearch.

Property Documentation

◆ mode

- (SYCustomPlacesMode) mode
readwritenonatomicassign

Custom places mode: Online or Offline.

◆ delegate

- (id<SYCustomPlacesManagerDelegate>) delegate
readwritenonatomicweak

Current delegate which gets notifications about changes of SYCustomPlacesManager state.

◆ defaultDatasetId

- (NSString*) defaultDatasetId
readnonatomicassign

ID of the default custom places dataset.


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