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:
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;
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-27 UTC."],[],[],null,["# GoogleMaps3D Framework Reference\n\nMap\n===\n\n @MainActor\n @preconcurrency\n struct Map\n\n extension Map : MapAnimatable, Sendable, View\n\n- `\n ``\n ``\n `\n\n ### [Body](#/s:12GoogleMaps3D3MapV4Bodya)\n\n `\n ` \n The type of view representing the body of this view.\n\n When you create a custom view, Swift infers this type from your\n implementation of the required `View/body-swift.property` property. \n\n #### Declaration\n\n Swift \n\n @available(watchOS, introduced: 6.0)\n @available(macOS, introduced: 10.15)\n @available(iOS, introduced: 13.0)\n @available(tvOS, introduced: 13.0)\n typealias Body = some View\n\n- `\n ``\n ``\n `\n\n ### [apiKey](#/s:12GoogleMaps3D3MapV6apiKeySSvpZ)\n\n `\n ` \n The API key to use for the Google Maps SDK.\n\n This is required to use the Google Maps SDK. \n\n #### Declaration\n\n Swift \n\n @MainActor\n @preconcurrency\n static var apiKey: String { get set }\n\n- `\n ``\n ``\n `\n\n ### [body](#/s:12GoogleMaps3D3MapV4bodyQrvp)\n\n `\n ` \n The content and behavior of the view.\n\n When you implement a custom view, you must implement a computed\n `body` property to provide the content for your view. Return a view\n that's composed of built-in views that SwiftUI provides, plus other\n composite views that you've already defined: \n\n struct MyView: View {\n var body: some View {\n Text(\"Hello, World!\")\n }\n }\n\n For more information about composing views and a view hierarchy,\n see \u003cdoc:Declaring-a-Custom-View\u003e. \n\n #### Declaration\n\n Swift \n\n @MainActor\n @preconcurrency\n var body: some View { get }\n\n- `\n ``\n ``\n `\n\n ### [coordinator](#/s:12GoogleMaps3D3MapV11coordinatorAA20RenderingCoordinatorCvp)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n @MainActor\n @preconcurrency\n var coordinator: RenderingCoordinator\n\n- `\n ``\n ``\n `\n\n ### [init(camera:mode:content:)](#/s:12GoogleMaps3D3MapV6camera4mode7contentAC7SwiftUI7BindingVyAA6CameraVG_AA0C4ModeOAA0C7Content_pyXEtcfc)\n\n `\n ` \n Initializes the map view with the specified camera, mode, and content.\n\n This method configures the map's initial viewpoint, rendering style, and displayed content. \n\n #### Declaration\n\n Swift \n\n @MainActor\n @preconcurrency\n init(camera: Binding\u003c../Structs/Camera.html\u003e, mode: ../Enums/MapMode.html, @MapContentBuilder content: () -\u003e any MapContent = { MapContentArray.empty })\n\n #### Parameters\n\n |-----------------|---------------------------------------------------------------------------|\n | ` `*camera*` ` | The camera position and orientation binding, defining the map's viewport. |\n | ` `*mode*` ` | The desired map mode (e.g., `.hybrid`, `.satellite`). |\n | ` `*content*` ` | The content to be displayed on the map. This parameter is optional; |\n\n- `\n ``\n ``\n `\n\n ### [init(initialCamera:mode:content:)](#/s:12GoogleMaps3D3MapV13initialCamera4mode7contentAcA0E0V_AA0C4ModeOAA0C7Content_pyXEtcfc)\n\n `\n ` \n Initializes the map view with the specified camera, mode, and content.\n\n This method configures the map's initial viewpoint and rendering style. \n\n #### Declaration\n\n Swift \n\n @MainActor\n @preconcurrency\n init(initialCamera: ../Structs/Camera.html = .init(latitude: 0, longitude: 0, altitude: 63_170_000), mode: ../Enums/MapMode.html, @MapContentBuilder content: () -\u003e any MapContent = { MapContentArray.empty })\n\n #### Parameters\n\n |-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*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}. |\n | ` `*mode*` ` | The desired map mode (e.g., `.hybrid`, `.satellite`). |\n | ` `*content*` ` | The content to be displayed on the map. This parameter is optional; |"]]