Skip to content

Commit

Permalink
Add documenation to did fail to load image (#1365)
Browse files Browse the repository at this point in the history
  • Loading branch information
fonok3 authored Jul 13, 2023
1 parent 14cc029 commit 1df69db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions platform/ios/platform/ios/src/MLNMapViewDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
6 changes: 6 additions & 0 deletions platform/ios/platform/macos/src/MLNMapViewDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down

0 comments on commit 1df69db

Please sign in to comment.