---
title: "selectAnnotation(_:animated:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mkmapview/selectannotation(_:animated:)"
---

# selectAnnotation(_:animated:)

Selects the specified annotation and displays a callout view for it.

## Declaration

```swift
func selectAnnotation(_ annotation: any MKAnnotation, animated: Bool)
```

## Parameters

- `annotation`: The annotation object to select.
- `animated`: If doc://com.apple.documentation/documentation/Swift/true, the map view animates the callout view into position.

## Discussion

Discussion If the specified annotation isn’t onscreen, and, therefore, doesn’t have an associated annotation view, this method has no effect.

## See Also

### Managing annotation selections

- [annotationVisibleRect](mapkit/mkmapview/annotationvisiblerect.md)
- [selectedAnnotations](mapkit/mkmapview/selectedannotations.md)
- [deselectAnnotation(_:animated:)](mapkit/mkmapview/deselectannotation(_:animated:).md)
