From 1df69db20b0739786260ad6727f356c91e734e0c Mon Sep 17 00:00:00 2001 From: Florian Herzog Date: Thu, 13 Jul 2023 15:14:22 +0200 Subject: [PATCH] Add documenation to did fail to load image (#1365) --- platform/ios/platform/ios/src/MLNMapViewDelegate.h | 6 ++++++ platform/ios/platform/macos/src/MLNMapViewDelegate.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/platform/ios/platform/ios/src/MLNMapViewDelegate.h b/platform/ios/platform/ios/src/MLNMapViewDelegate.h index da660fcff..bf1a05b71 100644 --- a/platform/ios/platform/ios/src/MLNMapViewDelegate.h +++ b/platform/ios/platform/ios/src/MLNMapViewDelegate.h @@ -276,6 +276,12 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)mapView:(MLNMapView *)mapView didFinishLoadingStyle:(MLNStyle *)style; +/** + Tells the delegate that the `mapView` is missing an image. The image should be added synchronously with `-[MLNStyle setImage:forName:]` to be rendered on the current zoom level. When loading icons asynchronously, you can load a placeholder image and replace it when your image has loaded. + + @param mapView The map view that is loading the image. + @param imageName The name of the image that is missing. + */ - (nullable UIImage *)mapView:(MLNMapView *)mapView didFailToLoadImage:(NSString *)imageName; /** diff --git a/platform/ios/platform/macos/src/MLNMapViewDelegate.h b/platform/ios/platform/macos/src/MLNMapViewDelegate.h index 4cfaf8b7f..486abc7ac 100644 --- a/platform/ios/platform/macos/src/MLNMapViewDelegate.h +++ b/platform/ios/platform/macos/src/MLNMapViewDelegate.h @@ -181,6 +181,12 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)mapView:(MLNMapView *)mapView didFinishLoadingStyle:(MLNStyle *)style; +/** + Tells the delegate that the `mapView` is missing an image. The image should be added synchronously with `-[MLNStyle setImage:forName:]` to be rendered on the current zoom level. When loading icons asynchronously, you can load a placeholder image and replace it when your image has loaded. + + @param mapView The map view that is loading the image. + @param imageName The name of the image that is missing. + */ - (nullable NSImage *)mapView:(MLNMapView *)mapView didFailToLoadImage:(NSString *)imageName; /**