---
title: "init(item:anchor:accessoryAnchor:content:)"
framework: mapkit
role: symbol
role_heading: Initializer
path: "mapkit/annotation/init(item:anchor:accessoryanchor:content:)"
---

# init(item:anchor:accessoryAnchor:content:)

Creates an annotation that displays a view at a coordinate on the map.

## Declaration

```swift
@MainActor @preconcurrency init(item: MKMapItem, anchor: UnitPoint = .center, accessoryAnchor: UnitPoint = .center, @ViewBuilder content: () -> Content) where Label == Text
```

## Parameters

- `item`: A map item that provides a label and coordinate for the annotation.
- `anchor`: A doc://com.apple.documentation/documentation/SwiftUI/UnitPoint value that indicates how to position the content around the provided coordinate.
- `accessoryAnchor`: A doc://com.apple.documentation/documentation/SwiftUI/UnitPoint value that indicates how to place accessories around the provided content.
- `content`: The view to place on the map.

## See Also

### Creating annotations

- [init(_:coordinate:anchor:accessoryAnchor:content:)](mapkit/annotation/init(_:coordinate:anchor:accessoryanchor:content:)-6rxmn.md)
- [init(_:coordinate:anchor:accessoryAnchor:content:)](mapkit/annotation/init(_:coordinate:anchor:accessoryanchor:content:)-14m3t.md)
- [init(coordinate:anchor:accessoryAnchor:content:label:)](mapkit/annotation/init(coordinate:anchor:accessoryanchor:content:label:).md)
- [init(_:coordinate:anchor:content:)](mapkit/annotation/init(_:coordinate:anchor:content:)-2w242.md)
- [init(_:coordinate:anchor:content:)](mapkit/annotation/init(_:coordinate:anchor:content:)-6wnoh.md)
- [init(coordinate:anchor:content:label:)](mapkit/annotation/init(coordinate:anchor:content:label:).md)
