summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmkiley <jordan.kiley@mapbox.com>2019-07-15 14:07:08 -0700
committerjmkiley <jordan.kiley@mapbox.com>2019-07-15 14:07:19 -0700
commitd59fe4ae0fb09936fdd6b14efe601198209e6909 (patch)
treec189f3f12bbbbb41c459fda7c0bdddf99566b681
parent92acb3f570c40bfce7a3b5ea53715a307e9a18da (diff)
downloadqtlocation-mapboxgl-d59fe4ae0fb09936fdd6b14efe601198209e6909.tar.gz
[ios] address feedback
-rw-r--r--platform/darwin/src/MGLOfflineStorage.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/platform/darwin/src/MGLOfflineStorage.h b/platform/darwin/src/MGLOfflineStorage.h
index bea8b789ad..b78303fdda 100644
--- a/platform/darwin/src/MGLOfflineStorage.h
+++ b/platform/darwin/src/MGLOfflineStorage.h
@@ -303,9 +303,9 @@ MGL_EXPORT
- (void)removePack:(MGLOfflinePack *)pack withCompletionHandler:(nullable MGLOfflinePackRemovalCompletionHandler)completion;
/**
- Checks that the tiles in the specified offline pack match those from the
- server. Local tiles that do not match the latest version on the server
- are updated.
+ Invalidates the specified offline pack. This method checks that the tiles
+ in the specified offline pack match those from the server. Local tiles that
+ do not match the latest version on the server are updated.
This is more efficient than deleting the offline pack and downloading it
again. If the data stored locally matches that on the server, new data will
@@ -364,15 +364,16 @@ MGL_EXPORT
to `0`. Setting the maximum ambient cache size does not impact the maximum size
of offline packs.
- If you intend to use offline packs, this may limit the amount of space available
- for ambient caching, with no impact on offline packs. If you set the maximum
- ambient cache size to 30 MB and offline packs use 20 MB, there may only be 10 MB
- reserved for the ambient cache.
+ While this method does not limit the space available to offline packs,
+ data in offline packs count towards this limit. If the maximum ambient
+ cache size is set to 30 MB and 20 MB of offline packs are downloaded,
+ there may be only 10 MB reserved for the ambient cache.
This method should be called before the map and map style have been loaded.
- This method is potentially expensive, as the ambient cache will trim cached data
- to prevent the database from being larger than the specified amount.
+ This method is potentially expensive, as the database will trim cached data
+ in order to prevent the ambient cache from being larger than the
+ specified amount.
@param cacheSize The maximum size in bytes for the ambient cache.
@param completion The completion handler to call once the maximum ambient cache size
@@ -382,7 +383,7 @@ MGL_EXPORT
- (void)setMaximumAmbientCacheSize:(NSUInteger)cacheSize withCompletionHandler:(void (^)(NSError *_Nullable error))completion;
/**
- Checks that the tiles in the ambient cache match those from the server. Local
+ Invalidates the ambient cache. Checks that the tiles in the ambient cache match those from the server. Local
tiles that do not match the latest version on the server are updated.
This is more efficient than cleaning the cache because valid local tiles will
@@ -397,10 +398,8 @@ MGL_EXPORT
- (void)invalidateAmbientCacheWithCompletionHandler:(void (^)(NSError *_Nullable error))completion;
/**
- Erase resources from the ambient cache.
-
- Resources that are shared with offline regions will not be affected by
- this method.
+ Clears the ambient cache, freeing storage space. This method does not
+ affect resources shared with offline regions.
@param completion The completion handler to call once the ambient cache has been
cleared. This handler is executed asynchronously on the main queue.
@@ -409,8 +408,8 @@ MGL_EXPORT
- (void)clearAmbientCacheWithCompletionHandler:(void (^)(NSError *_Nullable error))completion;
/**
- Delete the existing database, which includes both the ambient cache and offline packs,
- then reinitialize it.
+ Deletes the existing database, which includes both the ambient cache and offline packs,
+ then reinitializes it.
You typically do not need to call this method.