SKTilesCacheManager Class Reference

Inherits from NSObject
Declared in SKTilesCacheManager.h

Overview

SKMapsManager’s tiles cache manager. Should not be explicitly allocated. Provides advanced management for the tiles caching mechanism.

  cacheSize

Current size of the map cache already on the device, in bytes.

@property (nonatomic, readonly, assign) unsigned long long cacheSize

Discussion

Current size of the map cache already on the device, in bytes.

Declared In

SKTilesCacheManager.h

  cacheLimit

Limit of the cache size, in bytes.

@property (nonatomic, assign) unsigned long long cacheLimit

Discussion

Limit of the cache size, in bytes.

Declared In

SKTilesCacheManager.h

– deleteAllMapsDataWithCachesPath:

Deletes all the map related data from the disk, including cache from online usage, offline map packets, metadata, textures. When updating an application, this can be called on the first start of the updated app to clear the maps from the previous version. All the offline map packages from previous instalation will have to be reinstalled. Call the deleteAllMapsDataWithCachesPath: method before any other SKMapsService usage ( even before initializeSKMapsWithAPIKey:settings: method ), otherwise the library will have an unexpected behavior.

- (BOOL)deleteAllMapsDataWithCachesPath:(NSString *)cachesPath

Parameters

cachesPath

The path to the map caches, if previously set using SKMapsInitSettings. Otherwise, just pass nil and the cache from the default path will be deleted.

Return Value

Success or failure of maps data deletion.

Discussion

Deletes all the map related data from the disk, including cache from online usage, offline map packets, metadata, textures. When updating an application, this can be called on the first start of the updated app to clear the maps from the previous version. All the offline map packages from previous instalation will have to be reinstalled. Call the deleteAllMapsDataWithCachesPath: method before any other SKMapsService usage ( even before initializeSKMapsWithAPIKey:settings: method ), otherwise the library will have an unexpected behavior.

Declared In

SKTilesCacheManager.h

– deleteAllCache

Deletes all the tiles cached when using online maps, releasing disk space.

- (void)deleteAllCache

Discussion

Deletes all the tiles cached when using online maps, releasing disk space.

Declared In

SKTilesCacheManager.h

– deleteCacheOlderThan:

Deletes map tiles cached when using online maps older than a certain time, releasing disk space.

- (void)deleteCacheOlderThan:(long)seconds

Parameters

seconds

Tiles older than seconds will be deleted.

Discussion

Deletes map tiles cached when using online maps older than a certain time, releasing disk space.

Declared In

SKTilesCacheManager.h