GoogleNavigation Framework Reference
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
      
        
          
            GMSNavigationAccessoryView
              
                
                  @protocol GMSNavigationAccessoryView <NSObject>
                 
               
            Protocol defining methods that support custom views specifying accessory UI elements applied to
the primary view. Accessory views must implement this protocol in order to be visible.
          
          
            
              
                - 
                  
                  
                    
                    
                      
                      
                        
                       
                        Declaration
                          Swift func heightForAccessoryViewConstrained(to size: CGSize, on mapView: GMSMapView) -> CGFloat
 
 
                          Objective-C - (CGFloat)heightForAccessoryViewConstrainedToSize:(CGSize)size
                                         onMapView:
                                             (nonnull GMSMapView *)mapView;
 
 
 
                        Return ValueDesired height of the accessory view constrained to the given size.
 
 
 
           
        
      
     
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-08-27 UTC.
  
  
  
    
      [null,null,["Last updated 2025-08-27 UTC."],[],["The `GMSNavigationAccessoryView` protocol defines how custom accessory UI elements are displayed on a primary view. Accessory views must implement this protocol to be visible.  The key method is `heightForAccessoryViewConstrainedToSize:onMapView:`, which determines the desired height of the accessory view, given a size constraint and a `GMSMapView` instance. This method must return the height of the accessory view when constrained to a specific size.\n"]]