GMSMapViewNavigationLayout
@protocol GMSMapViewNavigationLayout;
Protocol for an object that hosts the layoutDelegate property, adopted by the NavigationLayout category of GMSMapView.
-
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<GMSNavigationLayoutDelegate> layoutDelegate; -
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)?) throwsObjective-C
- (BOOL)setLayoutDelegate: (nullable id<GMSNavigationLayoutDelegate>)layoutDelegate error:(NSError *_Nullable *_Nullable)error;Parameters
layoutDelegateThe layout delegate to set, or
nilto use the built-in layout code.