GooglePlacesSwift Framework Reference
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
      
        
          
            FetchPhotoRequest
              
                
                  struct FetchPhotoRequest
extension FetchPhotoRequest : Sendable
                 
               
            The request for a specific placeID and place properties to include in the Place response.
          
          
            
              
                - 
                  
                  
                    
                    
                      
                      
                        Request object to use with PlacesClientto fetch a photo.
 If the image is smaller than the values specified, the original image will be returned. If
the image is larger in either dimension, it will be scaled to match the smaller of the two
dimensions, restricted to its original aspect ratio. CGSize height and width should be set
to an integer between 1 and 4800. If not, the PlacesClientrequest callback will return
an error.
 
 
                        Declaration
                          Swift init(photo: Photo, maxSize: CGSize)
 
 
 
                        Parameters
                          
                            
                              | 
                                photo
                                 |  |  
                              | 
                                maxSize
                                 | 
                                  The maximum desired size in pixels of the image returned by the Place Photos
service. |  
 
 
 
           
        
      
     
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  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 `FetchPhotoRequest` struct is used to request a photo from a specific place, including specified properties. It initializes with a `Photo` and `maxSize` (CGSize). The photo will be scaled down if it exceeds the `maxSize` dimensions, maintaining its aspect ratio. Dimensions must be integers between 1 and 4800; otherwise, the request will fail. The struct interacts with `PlacesClient` to fetch the requested photo.\n"]]