# Map

    @MainActor
    @preconcurrency
    struct Map

    extension Map : MapAnimatable, Sendable, SendableMetatype, View

- `


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


  ` 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

- `


  ### [apiKey](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Map#/s:12GoogleMaps3D3MapV6apiKeySSvpZ)


  ` The API key to use for the Google Maps SDK.

  This is required to use the Google Maps SDK.

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      static var apiKey: String { get set }

- `


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


  ` 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(camera:mode:content:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Map#/s:12GoogleMaps3D3MapV6camera4mode7contentAC7SwiftUI7BindingVyAA6CameraVG_AA0C4ModeOxyXEtcAA0C7ContentRzlufc)


  ` Initializes the map view with the specified camera, mode, and content.

  This method configures the map's initial viewpoint, rendering style, and displayed content.

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      init<Content>(camera: Binding<https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Camera.html>, mode: https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Enums/MapMode.html, @MapContentBuilder content: () -> Content = { EmptyMapContent() }) where Content : MapContent

  #### Parameters

  |---|---|
  | ` camera ` | The camera position and orientation binding, defining the map's viewport. |
  | ` mode ` | The desired map mode (e.g., `.hybrid`, `.satellite`). |
  | ` content ` | The content to be displayed on the map. This parameter is optional; |

- `


  ### [init(initialCamera:mode:content:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Map#/s:12GoogleMaps3D3MapV13initialCamera4mode7contentAcA0E0V_AA0C4ModeOxyXEtcAA0C7ContentRzlufc)


  ` Initializes the map view with the specified camera, mode, and content.

  This method configures the map's initial viewpoint and rendering style.

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      init<Content>(initialCamera: https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Camera.html = .init(center: .init(latitude: 0, longitude: 0, altitude: 63_170_000)), mode: https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Enums/MapMode.html, @MapContentBuilder content: () -> Content = { EmptyMapContent() }) where Content : MapContent

  #### Parameters

  |---|---|
  | ` initialCamera ` | The initial camera position and orientation, defining the map's viewport. Defaults to a global view at {latitude: 0, longitude: 0, altitude: 63,170,000 meters}. |
  | ` mode ` | The desired map mode (e.g., `.hybrid`, `.satellite`). |
  | ` content ` | The content to be displayed on the map. This parameter is optional; |

- `


  ### [openSourceLicenseInfo](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Map#/s:12GoogleMaps3D3MapV21openSourceLicenseInfoSSvpZ)


  ` Returns the open source license information for the Google Maps SDK.

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      static let openSourceLicenseInfo: String

- `


  ### [style(mapID:error:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Map#/s:12GoogleMaps3D3MapV5style5mapID5errorACSS_yycSgtF)


  ` Applies a Cloud-based Map Style to the map.

  Use this method to associate a unique Map ID with your map instance.
  Map IDs are created and managed in the Google Cloud Console.
  Changing the `mapID` will trigger a full recreation of the Map view.

  [Manage Map Styles](https://console.cloud.google.com/google/maps-apis/studio/styles)

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      func style(mapID: String, error: (() -> Void)? = nil) -> Map

  #### Parameters

  |---|---|
  | ` mapID ` | The unique Map ID string generated in the Google Cloud Console. |
  | ` error ` | A closure executed if the style fails to load (e.g., due to network issues or an invalid Map ID). |

  #### Return Value

  A map view configured with the specified style.
- `


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


  ` Enables or disables the place information card when a POI is tapped.

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      func placeInformationEnabled(_ enabled: Bool = true) -> Map

  #### Parameters

  |---|---|
  | ` enabled ` | Whether the plugin should be enabled. Defaults to `true`. |

  #### Return Value

  The modified Map view.