NTCartoPackageManager
@interface NTCartoPackageManager : NTPackageManager
Offline map package manager that uses Carto online service for map package downloads. After packages are downloaded, they can be used offline without any connection to the server.
-
Constructs a CartoPackageManager object, given application context and data folder. The data folder must exist before creating a new package manager and it is assumed to be persistent. Note: the package manager must be explicitly started using start() method!
Warning
Throws NSException If package manager fails to open or create package database.Declaration
Objective-C
- (id)initWithSource:(NSString *)source dataFolder:(NSString *)dataFolder;
Parameters
source
Name of the package source. The official source is “carto.streets”.
dataFolder
The folder where downloaded packages are kept. It must exist and must be writable.
-
Returns the specified style asset package.
Declaration
Objective-C
- (NTAssetPackage *)getStyleAssetPackage:(enum NTCartoBaseMapStyle)style;
Parameters
style
The style of the asset package to return.
-
Starts updating the specified map style asynchronously. When this task finishes, listener is called.
Declaration
Objective-C
- (BOOL)startStyleDownload:(enum NTCartoBaseMapStyle)style;
Return Value
True if the style will be downloaded and listener will be notified (if set). False if it can not be downloaded.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;