<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/Annotation/init(_:coordinate:anchor:content:)-8k419",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "MapKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:15_MapKit_SwiftUI10AnnotationV_10coordinate6anchor7contentACy0cD04TextVq_G10Foundation23LocalizedStringResourceV_So22CLLocationCoordinate2DVAG9UnitPointVq_yXEtcAIRszrlufc"
  },
  "title" : "init(_:coordinate:anchor:content:)"
}
-->

# init(_:coordinate:anchor:content:)

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

```
@MainActor @preconcurrency init(_ titleResource: LocalizedStringResource, coordinate: CLLocationCoordinate2D, anchor: UnitPoint = .center, @ViewBuilder content: () -> Content) where Label == Text
```

## Parameters

`titleResource`

The localized string for the title.

`coordinate`

The coordinate to display the annotation at.

`anchor`

How to place the content around the provided coordinate.

`content`

The view to place on the map.

## Discussion

Uses `.center` for `accessoryAnchor`. For greater control of selection accessory
positioning, please use an initializer with an `accessoryAnchor` parameter.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)