# View

    extension View where Controls : MapControl, Self : MapAnimatable

    extension View where Self : MapAnimatable

    extension View where Self : MapAnimatable, Trigger : Equatable

    extension View where Self : https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Protocols.html#/s:12GoogleMaps3D18MapContentTappableP

[## Available where \`Controls\` : \`MapControl\`, \`Self\` : \`MapAnimatable\`](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Extensions/View#/Available-where-%60Controls%60-%3A-%60MapControl%60%2C-%60Self%60-%3A-%60MapAnimatable%60)

- `


  ### [mapControls(at:margin:spacing:_:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Extensions/View#/s:7SwiftUI4ViewP12GoogleMaps3DAD13MapAnimatableRzrlE11mapControls2at6margin7spacing_QrAD0F15ControlPositionO_14CoreFoundation7CGFloatVANqd__yXEtAD0fM0Rd__lF)


  ` Adds custom controls to the map view.

  Use this modifier to place controls like the compass, zoom buttons at a specific position
  on the map.
  Applying this modifier multiple times for the same position will overwrite any previously
  set controls for that position.

  Controls are ordered from top to bottom for vertical positions (.leading, .trailing) and
  from left to right for horizontal positions (.top, .bottom).

  Use SwiftUI's `Spacer` to push controls to one side, attach them to the opposite side,
  or add flexible space between them.

      Map(mode: .hybrid)
        .mapControls(at: .trailing) {
          CompassControl()
          ZoomControl()
        }
        .mapControls(at: .top) {
          Spacer()
          PanHorizontalControl()
        }

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      func mapControls<Controls>(at position: https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Enums/MapControlPosition.html = .trailing, margin: CGFloat = 16, spacing: CGFloat = 8, https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/MapControlsBuilder.html _ controls: () -> Controls) -> some MapAnimatable & View

  #### Parameters

  |---|---|
  | ` at ` | The edge of the map where the controls should be placed. Defaults to `.trailing`. |
  | ` margin ` | The distance between the controls and the map edge. Defaults to `16`. |
  | ` spacing ` | The distance between individual controls in the stack. Defaults to `8`. |
  | ` controls ` | A result builder closure that specifies the controls to display. |

[## Available where \`Self\` : \`MapAnimatable\`](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Extensions/View#/Available-where-%60Self%60-%3A-%60MapAnimatable%60)

- `


  ### [cameraRestrictions(_:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Extensions/View#/s:7SwiftUI4ViewP12GoogleMaps3DAD13MapAnimatableRzrlE18cameraRestrictionsyxSayAD17CameraRestrictionOGF)


  ` Applies a set of restrictions to the map's camera behavior.

  Use this modifier to constrain how the user can manipulate the map's viewpoint,
  ensuring it stays within defined altitude, heading, tilt, or geographical bounds.
  Applying an empty array removes any existing restrictions.

      Map(mode: .hybrid)
        .cameraRestrictions([
          .altitude(0...10000), // Limit zoom-out altitude
          .tilt(0...60)         // Limit maximum tilt
        ])

  Note

  If the array has more than one restriction of the same type, the last one will be
  used.

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      func cameraRestrictions(_ restrictions: [https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Enums/CameraRestriction.html]) -> Self

  #### Parameters

  |---|---|
  | ` restrictions ` | An array of `https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Enums/CameraRestriction.html` cases defining the limits to apply to the camera's movement and orientation. |

  #### Return Value

  The `https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Map.html` instance, allowing for further modifier chaining.
- `


  ### [onTap(_:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Extensions/View#/s:7SwiftUI4ViewP12GoogleMaps3DAD13MapAnimatableRzrlE5onTapyQryAD0fI4InfoVcF)


  ` Adds a closure to be called when the map is tapped.

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      func onTap(_ handler: @escaping (https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/MapTapInfo.html) -> Void) -> some MapAnimatable & View

  #### Parameters

  |---|---|
  | ` handler ` | A closure that the system calls when the map is tapped. This closure receives a `https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/MapTapInfo.html` object containing tap content information and geographic coordinates. |

[## Available where \`Self\` : \`MapAnimatable\`, \`Trigger\` : \`Equatable\`](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Extensions/View#/Available-where-%60Self%60-%3A-%60MapAnimatable%60%2C-%60Trigger%60-%3A-%60Equatable%60)

- `


  ### [flyCameraAround(_:duration:repeatCount:trigger:completion:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Extensions/View#/s:7SwiftUI4ViewP12GoogleMaps3DAD13MapAnimatableRzrlE15flyCameraAround_8duration11repeatCount7trigger10completionAA15ModifiedContentVyxAD23EquatableChangeModifierVyqd__GGAD0I0V_S2dqd__yycSgtSQRd__lF)


  ` Fly the camera around the given center camera with the given duration and repeat count.

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      func flyCameraAround<Trigger>(_ camera: https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Camera.html, duration: TimeInterval = 2, repeatCount: Double = 1, trigger: Trigger, completion: (() -> Void)? = nil) -> ModifiedContent<Self, EquatableChangeModifier<Trigger>>

  #### Parameters

  |---|---|
  | ` camera ` | The center camera to fly around. |
  | ` duration ` | The duration of one animation cycle in seconds. |
  | ` repeatCount ` | The number of times to fly around the center camera. |
  | ` trigger ` | The trigger to fly the camera. |
  | ` completion ` | The callback to be called when the animation is complete. |

- `


  ### [flyCameraTo(_:duration:trigger:completion:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Extensions/View#/s:7SwiftUI4ViewP12GoogleMaps3DAD13MapAnimatableRzrlE11flyCameraTo_8duration7trigger10completionAA15ModifiedContentVyxAD23EquatableChangeModifierVyqd__GGAD0I0V_Sdqd__yycSgtSQRd__lF)


  ` Fly the camera to the given destination camera with the given duration.

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      func flyCameraTo<Trigger>(_ camera: https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Structs/Camera.html, duration: TimeInterval = 2, trigger: Trigger, completion: (() -> Void)? = nil) -> ModifiedContent<Self, EquatableChangeModifier<Trigger>>

  #### Parameters

  |---|---|
  | ` camera ` | The destination camera to fly to. |
  | ` duration ` | The duration of the animation in seconds. |
  | ` trigger ` | The trigger to fly the camera. |
  | ` completion ` | The callback to be called when the animation is complete. |

[## Available where \`Self\` : \`MapContentTappable\`](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Extensions/View#/Available-where-%60Self%60-%3A-%60MapContentTappable%60)

- `


  ### [onTap(_:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Extensions/View#/s:7SwiftUI4ViewP12GoogleMaps3DAD18MapContentTappableRzrlE5onTapyQryycF)


  ` Registers a handler to be called when the map content is tapped.

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      func onTap(_ handler: @escaping () -> Void) -> some MapContent

  #### Parameters

  |---|---|
  | ` handler ` | The handler to be called when the map content is tapped. |

[## Available where \`Self\` : \`MapAnimatable\`](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Extensions/View#/Available-where-%60Self%60-%3A-%60MapAnimatable%602)

- `


  ### [onPlaceTap(_:)](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Extensions/View#/s:7SwiftUI4ViewP15GoogleMaps3DKit0dE1D13MapAnimatableRzrlE10onPlaceTapyQrAD0jK6ActionOSScF)


  ` Adds a closure to be called when a place is tapped to determine the behavior of the built-in place information plugin.

  #### Declaration

  Swift

      @MainActor
      @preconcurrency
      func onPlaceTap(_ handler: @escaping (String) -> https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Enums/PlaceTapAction.html) -> some MapAnimatable & View

  #### Parameters

  |---|---|
  | ` handler ` | A closure that the system calls when a place is tapped. This closure receives the place ID and returns a `https://developers.google.com/maps/documentation/maps-3d/ios-sdk/reference/Enums/PlaceTapAction.html`. |