From 72c342284c13a8f524b5f1aef3bf452f85dd8eee Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Mon, 27 Jun 2016 17:19:58 +0200 Subject: [ios] map view now calls -didAddAnnotationViews (#5466) --- platform/ios/src/MGLMapViewDelegate.h | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'platform/ios/src/MGLMapViewDelegate.h') diff --git a/platform/ios/src/MGLMapViewDelegate.h b/platform/ios/src/MGLMapViewDelegate.h index 173b40f93f..f425964e97 100644 --- a/platform/ios/src/MGLMapViewDelegate.h +++ b/platform/ios/src/MGLMapViewDelegate.h @@ -130,15 +130,6 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Managing the Display of Annotations -/** - Returns a view object to use for the marker for the specified point annotation object. - - @param mapView The map view that requested the annotation view. - @param annotation The object representing the annotation that is about to be displayed. - @return The view object to display for the specified annotation or `nil` if you want to display the default marker image. - */ -- (nullable MGLAnnotationView *)mapView:(MGLMapView *)mapView viewForAnnotation:(id )annotation; - /** Returns an image object to use for the marker for the specified point annotation object. @@ -279,7 +270,6 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)mapView:(MGLMapView *)mapView didDeselectAnnotation:(id )annotation; - /** Tells the delegate that one of its annotation views was selected. @@ -300,6 +290,27 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)mapView:(MGLMapView *)mapView didDeselectAnnotationView:(MGLAnnotationView *)annotationView; +#pragma mark Managing annotation views + +/** + Returns a view object to use for the marker for the specified point annotation object. + + @param mapView The map view that requested the annotation view. + @param annotation The object representing the annotation that is about to be displayed. + @return The view object to display for the specified annotation or `nil` if you want to display the default marker image. + */ +- (nullable MGLAnnotationView *)mapView:(MGLMapView *)mapView viewForAnnotation:(id )annotation; + +/** + Tells the delegate that new annotation views have been added and positioned on the map. + + You can use this method to animate the adding of the annotation views. + + @param mapView The map view containing the annotation views. + @param annotationViews The annotation views that was added. + */ +- (void)mapView:(MGLMapView *)mapView didAddAnnotationViews:(NS_ARRAY_OF(MGLAnnotationView *) *)annotationViews; + /** Tells the delegate that one if its annotation views was dragged to a new coordinate. -- cgit v1.2.1