# Popover

    @MainActor
    @preconcurrency
    struct Popover<Content> where Content : View

    extension Popover : MapContent, Sendable, SendableMetatype, View

A SwiftUI view that displays content in a "popover" bubble, anchored to a
position or another piece of map content on the 3D map.
- `


  ### [Body](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Popover#/s:12GoogleMaps3D7PopoverV4Bodya)


  ` 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.property` property.

  #### Declaration

  Swift

      typealias Body = some View

- `


  ### [body](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Popover#/s:12GoogleMaps3D7PopoverV4bodyQrvp)


  ` The content and behavior of the view.

  When you implement a custom view, you must implement a computed
  `body` property 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 }

- `


  ### [init(positionAnchor:altitudeMode:isOpen:offset:autoClosedEnabled:autoPanEnabled:content:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Popover#/s:12GoogleMaps3D7PopoverV14positionAnchor12altitudeMode6isOpen6offset17autoClosedEnabled0k3PanM07contentACyxGAA14LatLngAltitudeV_AA0rG0O7SwiftUI7BindingVySbGSo6CGSizeVS2bxyXEtcfc)


  ` Creates a Popover anchored to a specific coordinate.

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      init(positionAnchor: https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/LatLngAltitude.html, altitudeMode: https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Enums/AltitudeMode.html = .clampToGround, isOpen: Binding<Bool>, offset: CGSize = .zero, autoClosedEnabled: Bool = true, autoPanEnabled: Bool = true, @ViewBuilder content: () -> Content)

  #### Parameters

  |---|---|
  | ` altitudeMode ` | The altitude interpretation for the `position`. |
  | ` isOpen ` | A binding to control the visibility of the Popover. |
  | ` offset ` | The offset of the Popover from the anchor. |
  | ` autoClosedEnabled ` | Whether the Popover should automatically close when tapped. |
  | ` autoPanEnabled ` | Whether the camera should automatically pan to keep the Popover on-screen. |
  | ` content ` | The SwiftUI view to display inside the Popover. |

- `


  ### [style(_:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Popover#/s:12GoogleMaps3D7PopoverV5styleyACyxGAA0C5StyleVF)


  ` Configures the style of the Popover.

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      func style(_ style: https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/PopoverStyle.html) -> Popover<Content>

  #### Parameters

  |---|---|
  | ` style ` | The style to apply to the Popover. |