Popover
@MainActor
@preconcurrency
struct Popover<Content> where Content : Viewextension Popover : MapContent, Sendable, SendableMetatype, ViewA SwiftUI view that displays content in a “popover” bubble, anchored to a position or another piece of map content on the 3D map.
-
The type of view representing the body of this view.
When you create a custom view, Swift infers this type from your implementation of the required
View/body-swift.propertyproperty.Declaration
Swift
typealias Body = some View -
The content and behavior of the view.
When you implement a custom view, you must implement a computed
bodyproperty to provide the content for your view. Return a view that’s composed of built-in views that SwiftUI provides, plus other composite views that you’ve already defined:struct MyView: View { var body: some View { Text("Hello, World!") } }For more information about composing views and a view hierarchy, see doc:Declaring-a-Custom-View.
Declaration
Swift
@MainActor @preconcurrency var body: some View { get } -
Creates a Popover anchored to a specific coordinate.
Declaration
Swift
@MainActor @preconcurrency init(positionAnchor: LatLngAltitude, altitudeMode: AltitudeMode = .clampToGround, isOpen: Binding<Bool>, offset: CGSize = .zero, autoClosedEnabled: Bool = true, autoPanEnabled: Bool = true, @ViewBuilder content: () -> Content)Parameters
altitudeModeThe altitude interpretation for the
position.isOpenA binding to control the visibility of the Popover.
offsetThe offset of the Popover from the anchor.
autoClosedEnabledWhether the Popover should automatically close when tapped.
autoPanEnabledWhether the camera should automatically pan to keep the Popover on-screen.
contentThe SwiftUI view to display inside the Popover.
-
Configures the style of the Popover.
Declaration
Swift
@MainActor @preconcurrency func style(_ style: PopoverStyle) -> Popover<Content>Parameters
styleThe style to apply to the Popover.