---
title: "init(mapItem:)"
framework: mapkit
role: symbol
role_heading: Initializer
path: "mapkit/mkmapitemannotation/init(mapitem:)"
---

# init(mapItem:)

Creates a map item annotation

## Declaration

```swift
init?(mapItem: MKMapItem)
```

## Parameters

- `mapItem`: The map item this annotation will represent

## Discussion

Discussion If the map item does not have valid coordinate data, the result will be nil.
