mapItemDetailPopover(isPresented:item:displaysMap:attachmentAnchor:)
Presents a map item detail popover.
Declaration
@MainActor @preconcurrency func mapItemDetailPopover(isPresented: Binding<Bool>, item: MKMapItem?, displaysMap: Bool = true, attachmentAnchor: PopoverAttachmentAnchor = .rect(.bounds)) -> some View
Parameters
- isPresented:
The binding to whether the detail sheet should be shown.
- item:
The map item to display. If nil, a “loading” view is displayed.
- displaysMap:
If an inline map should be displayed with the place data. A value of
truemust 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(isPresented:item:displaysMap:attachmentAnchor:arrowEdge:).
See Also
Getting location information
LocationButtonMapmapStyle(_:)mapScope(_:)mapFeatureSelectionDisabled(_:)mapFeatureSelectionAccessory(_:)mapFeatureSelectionContent(content:)mapControls(_:)mapControlVisibility(_:)mapCameraKeyframeAnimator(trigger:keyframes:)lookAroundViewer(isPresented:scene:allowsNavigation:showsRoadLabels:pointsOfInterest:onDismiss:)lookAroundViewer(isPresented:initialScene:allowsNavigation:showsRoadLabels:pointsOfInterest:onDismiss:)onMapCameraChange(frequency:_:)mapItemDetailPopover(isPresented:item:displaysMap:attachmentAnchor:arrowEdge:)mapItemDetailPopover(item:displaysMap:attachmentAnchor:)