<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macOS: 15.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/mapItemDetailPopover(item:displaysMap:attachmentAnchor:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewP08_MapKit_aB0E20mapItemDetailPopover4item08displaysD016attachmentAnchorQrAA7BindingVySo05MKMapG0CSgG_SbAA0i10AttachmentM0OtF"
  },
  "title" : "mapItemDetailPopover(item:displaysMap:attachmentAnchor:)"
}
-->

# mapItemDetailPopover(item:displaysMap:attachmentAnchor:)

Presents a map item detail popover.

```
@MainActor @preconcurrency func mapItemDetailPopover(item: Binding<MKMapItem?>, displaysMap: Bool = true, attachmentAnchor: PopoverAttachmentAnchor = .rect(.bounds)) -> some View
```

## Parameters

`item`

When `item` is non-`nil`, a detail popover is displayed for the
map item.

`displaysMap`

If an inline map should be displayed with the place data.
A value of `true` must be specified if the application UI is not
already showing the place in a map view.

`attachmentAnchor`

The positioning anchor that defines the attachment
point of the popover. The default is `bounds`.

## Discussion

Use this modifier if you want the system to choose the best orientation
of the popover’s arrow. If you want to specify a particular edge for the
arrow, use
[`mapItemDetailPopover(item:displaysMap:attachmentAnchor:arrowEdge:)`](/documentation/SwiftUI/View/mapItemDetailPopover(item:displaysMap:attachmentAnchor:arrowEdge:)).

---

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)