# GMSMapViewNavigationLayout

    @protocol GMSMapViewNavigationLayout;

Protocol for an object that hosts the layoutDelegate property, adopted by the NavigationLayout
category of GMSMapView.
- `


  ### [layoutDelegate](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSMapViewNavigationLayout#/c:objc(pl)GMSMapViewNavigationLayout(py)layoutDelegate)


  ` The layout delegate for the map view.

  The map view will hold a strong reference to the layout delegate. The layout delegate may be set
  to `nil`, which will mean NavSDK's built-in layout code which implements the deprecated layout
  APIs will be used.

  #### Declaration

  Swift

      var layoutDelegate: (any NavigationLayoutDelegate)? { get }

  Objective-C

      @property (nonatomic, readonly, nullable) id<https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigationLayoutDelegate.html> layoutDelegate;

- `


  ### [-setLayoutDelegate:error:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSMapViewNavigationLayout#/c:objc(pl)GMSMapViewNavigationLayout(im)setLayoutDelegate:error:)


  ` Sets the layout delegate for the map view.

  This method may only be called before the navigation UI is enabled and cannot be called on a map
  view initialized on a CarPlay screen. If invoked after navigation UI has been enabled or on a
  CarPlay screen, throws an error (returns NO and populates the error in Objective-C).

  #### Declaration

  Swift

      func setLayoutDelegate(_ layoutDelegate: (any NavigationLayoutDelegate)?) throws

  Objective-C

      - (BOOL)setLayoutDelegate:
                  (nullable id<https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigationLayoutDelegate.html>)layoutDelegate
                          error:(NSError *_Nullable *_Nullable)error;

  #### Parameters

  |---|---|
  | ` layoutDelegate ` | The layout delegate to set, or `nil` to use the built-in layout code. |