---
title: "init(anchor:content:)"
framework: mapkit
role: symbol
role_heading: Initializer
path: "mapkit/userannotation/init(anchor:content:)-3e78j"
---

# init(anchor:content:)

Create an annotation that displays the person’s current location of the user using a custom view.

## Declaration

```swift
@MainActor @preconcurrency init(anchor: UnitPoint = .center, @ViewBuilder content: @escaping () -> Content)
```

## Parameters

- `anchor`: How to anchor the user location indicator around the person’s location. The default is doc://com.apple.documentation/documentation/SwiftUI/UnitPoint/center.
- `content`: The custom view used to indicate the person’s location.

## See Also

### Creating a user annotation

- [init()](mapkit/userannotation/init().md)
- [init(anchor:)](mapkit/userannotation/init(anchor:).md)
- [init(anchor:content:)](mapkit/userannotation/init(anchor:content:)-8u3r4.md)
