Instance Method


Returns the annotation objects located in the specified map rectangle.


- (NSSet<id<MKAnnotation>> *)annotationsInMapRect:(MKMapRect)mapRect;



The portion of the map that you want to search for annotations.

Return Value

The set of annotation objects located in mapRect.


This method offers a fast way to retrieve the annotation objects in a particular portion of the map. This method is much faster than doing a linear search of the objects in the annotations property yourself.

Special Considerations

Prior to iOS 7 this method incorrectly did not return instances of MKUserLocation.

See Also

Annotating the Map


The complete list of annotations associated with the receiver.

- addAnnotation:

Adds the specified annotation to the map view.

- addAnnotations:

Adds an array of annotation objects to the map view.

- removeAnnotation:

Removes the specified annotation object from the map view.

- removeAnnotations:

Removes an array of annotation objects from the map view.