---
title: "mapView(_:clusterAnnotationForMemberAnnotations:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mkmapviewdelegate/mapview(_:clusterannotationformemberannotations:)"
---

# mapView(_:clusterAnnotationForMemberAnnotations:)

Asks the delegate to provide a cluster annotation object for the specified annotations.

## Declaration

```swift
optional func mapView(_ mapView: MKMapView, clusterAnnotationForMemberAnnotations memberAnnotations: [any MKAnnotation]) -> MKClusterAnnotation
```

## Parameters

- `mapView`: The map view containing the specified annotations.
- `memberAnnotations`: The annotations for the map to cluster together. The returned doc://com.apple.mapkit/documentation/MapKit/MKClusterAnnotation object needs to include the specific annotations in this parameter.

## Return Value

Return Value The cluster annotation object.

## Discussion

Discussion Use this method to customize the cluster annotations that display on your map. Typically, MapKit creates cluster annotation objects automatically when one or more annotations with the same cluster identifier are too close together. However, you can implement this method and return a custom cluster annotation object for the specified set of annotations.

## See Also

### Managing annotation views

- [mapView(_:viewFor:)](mapkit/mkmapviewdelegate/mapview(_:viewfor:)-8humz.md)
- [mapView(_:didAdd:)](mapkit/mkmapviewdelegate/mapview(_:didadd:)-44xon.md)
- [mapView(_:annotationView:calloutAccessoryControlTapped:)](mapkit/mkmapviewdelegate/mapview(_:annotationview:calloutaccessorycontroltapped:).md)
