# View

    extension View

- `


  ### [basicPlaceAutocomplete(filter:uiCustomization:initialQuery:show:onSelection:onError:)](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Extensions/View#/s:7SwiftUI4ViewP012GooglePlacesA0E22basicPlaceAutocomplete6filter15uiCustomization12initialQuery4show11onSelection0O5ErrorQrAD0H6FilterVSg_AD0H15UICustomizationVSSAA7BindingVySbGyAD0G0VcyAD0eQ0OctF)


  ` A modifier that provides an autocomplete component for the user to select a place.

  When `show` is set to true, the user will be brought to a fullscreen view where they can select
  a place. As the user types, the component returns suggestions for places such as businesses,
  addresses, and points of interest. When the user selects a place, the component calls the
  `onSelection` handler with the selected place, and closes the fullscreen view.

  #### Declaration

  Swift

      @MainActor
      func basicPlaceAutocomplete(filter: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/AutocompleteFilter.html? = nil, uiCustomization: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/AutocompleteUICustomization.html = https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/AutocompleteUICustomization.html(), initialQuery: String = "", show: Binding<Bool>, onSelection: @escaping (https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/Place.html) -> Void, onError: @escaping (https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PlacesError.html) -> Void) -> some View

  #### Parameters

  |---|---|
  | ` filter ` | The filter to apply to the autocomplete requests from the component. |
  | ` uiCustomization ` | The UI customization to apply to the component. |
  | ` initialQuery ` | The initial query to use for the component. |
  | ` show ` | The binding for whether the component is shown. |
  | ` onSelection ` | The closure to run when a place is selected. |
  | ` onError ` | The closure to run when an error occurs. |

  #### Return Value

  A modified view that displays the component when `show` is true.
- `


  ### [placeAutocomplete(filter:uiCustomization:initialQuery:sessionToken:show:onSelection:onError:)](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Extensions/View#/s:7SwiftUI4ViewP012GooglePlacesA0E17placeAutocomplete6filter15uiCustomization12initialQuery12sessionToken4show11onSelection0P5ErrorQrAD0G6FilterVSg_AD0G15UICustomizationVSSAD0g7SessionN0VSgAA7BindingVySbGyAD0G15PlaceSuggestionV_AStcyAD0eR0OctF)


  ` A modifier that provides an autocomplete component for the user to select a place.

  When `show` is set to true, the user will be brought to a fullscreen view where they can select
  a place. As the user types, the component returns suggestions for places such as businesses,
  addresses, and points of interest. When the user selects a place, the component calls the
  `onSelection` handler with the selected place, and closes the fullscreen view.

  #### Declaration

  Swift

      @MainActor
      func placeAutocomplete(filter: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/AutocompleteFilter.html? = nil, uiCustomization: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/AutocompleteUICustomization.html = https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/AutocompleteUICustomization.html(), initialQuery: String = "", sessionToken: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/AutocompleteSessionToken.html? = nil, show: Binding<Bool>, onSelection: @escaping (https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/AutocompletePlaceSuggestion.html, https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/AutocompleteSessionToken.html) -> Void, onError: @escaping (https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PlacesError.html) -> Void) -> some View

  #### Parameters

  |---|---|
  | ` filter ` | The filter to apply to the autocomplete requests from the component. |
  | ` uiCustomization ` | The UI customization to apply to the component. |
  | ` initialQuery ` | The initial query to use for the component. |
  | ` sessionToken ` | The `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/AutocompleteSessionToken.html` to associate requests with a billing session. A unique session token should be provided each time the component is shown. If no session token is provided, one will be created internally and returned in the `onSelection` handler. |
  | ` show ` | The binding for whether the component is shown. |
  | ` onSelection ` | The closure to run when a place is selected. |
  | ` onError ` | The closure to run when an error occurs. |

  #### Return Value

  A modified view that displays the component when `show` is true.
- `


  ### [placeDetailsCompactContentSlot(position:content:)](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Extensions/View#/s:7SwiftUI4ViewP012GooglePlacesA0E30placeDetailsCompactContentSlot8position7contentQrAD05PlaceghJ8PositionO_qd__AD0M0VYbScMYcctAaBRd__lF)


  ` Adds a content slot to `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/AdvancedPlaceDetailsCompactView.html`.
  Important

  Only `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/AdvancedPlaceDetailsCompactView.html` renders content slots. Applying this
  modifier to any other widget, including the basic-tier `https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceDetailsCompactView.html`, has no
  effect: the content is not rendered, and a warning is written to the console.

  #### Declaration

  Swift

      @MainActor
      func placeDetailsCompactContentSlot(position: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PlaceDetailsCompactSlotPosition.html, @ViewBuilder content: @escaping @MainActor @Sendable (https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/Place.html) -> some View) -> some View

  #### Parameters

  |---|---|
  | ` position ` | The position of the content slot. |
  | ` content ` | A builder for the content to display, given the place shown by the widget. |

  #### Return Value

  A view that renders the given content at `position`.