summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Guerra <fabian.guerra@mapbox.com>2019-07-01 15:59:22 -0700
committerFabian Guerra <fabian.guerra@mapbox.com>2019-07-02 11:33:40 -0700
commitc24d67b38c1846f32069b68123bac100473504fe (patch)
tree009d94335f1fc6cdc3baf7391cdf0013ebd34095
parent55cb063668f43c4d320b39971e13f5a47fca4ee7 (diff)
downloadqtlocation-mapboxgl-upstream/fabian-eviction-14731.tar.gz
[ios, macos] Update shouldRemoveStyle method documentation.upstream/fabian-eviction-14731
-rw-r--r--platform/ios/src/MGLMapViewDelegate.h5
-rw-r--r--platform/macos/src/MGLMapViewDelegate.h25
2 files changed, 18 insertions, 12 deletions
diff --git a/platform/ios/src/MGLMapViewDelegate.h b/platform/ios/src/MGLMapViewDelegate.h
index f41476a34b..3ddb7b007f 100644
--- a/platform/ios/src/MGLMapViewDelegate.h
+++ b/platform/ios/src/MGLMapViewDelegate.h
@@ -281,10 +281,13 @@ NS_ASSUME_NONNULL_BEGIN
Asks the delegate whether the map view should evict cached images.
This method is called in two scenarios: when the cumulative size of unused images
- goes over the cache size or when the image's requesting tile is destroyed.
+ exceeds the cache size or when the last tile that includes the image is removed from
+ memory.
@param mapView The map view that is evicting the image.
@param imageName The image name that is going to be removed.
+ @return A Boolean value indicating whether the map view should evict
+ the cached image.
*/
- (BOOL)mapView:(MGLMapView *)mapView shouldRemoveStyleImage:(NSString *)imageName;
diff --git a/platform/macos/src/MGLMapViewDelegate.h b/platform/macos/src/MGLMapViewDelegate.h
index 6fb54e3a53..098164cd75 100644
--- a/platform/macos/src/MGLMapViewDelegate.h
+++ b/platform/macos/src/MGLMapViewDelegate.h
@@ -183,6 +183,20 @@ NS_ASSUME_NONNULL_BEGIN
- (nullable NSImage *)mapView:(MGLMapView *)mapView didFailToLoadImage:(NSString *)imageName;
+/**
+ Asks the delegate whether the map view should evict cached images.
+
+ This method is called in two scenarios: when the cumulative size of unused images
+ exceeds the cache size or when the last tile that includes the image is removed from
+ memory.
+
+ @param mapView The map view that is evicting the image.
+ @param imageName The image name that is going to be removed.
+ @return A Boolean value indicating whether the map view should evict
+ the cached image.
+ */
+- (BOOL)mapView:(MGLMapView *)mapView shouldRemoveStyleImage:(NSString *)imageName;
+
#pragma mark Managing the Appearance of Annotations
/**
@@ -333,17 +347,6 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (nullable NSViewController *)mapView:(MGLMapView *)mapView calloutViewControllerForAnnotation:(id <MGLAnnotation>)annotation;
-/**
- Asks the delegate whether the map view should evict cached images.
-
- This method is called in two scenarios: when the cumulative size of unused images
- goes over the cache size or when the image's requesting tile is destroyed.
-
- @param mapView The map view that is evicting the image.
- @param imageName The image name that is going to be removed.
- */
-- (BOOL)mapView:(MGLMapView *)mapView shouldRemoveStyleImage:(NSString *)imageName;
-
@end
NS_ASSUME_NONNULL_END