GooglePlaces Framework Reference

  • GMSPlacePhotoMetadata stores information about a single photo associated with a Google Maps Place, including attribution, author details, and maximum available size.

  • It's crucial to display the attributions to the user if the photo is used, complying with the Places SDK Terms of Service.

  • authorAttributions provide details about the photo's author and should also be shown when displaying the image.

  • The maxSize property indicates the largest dimensions at which the photo can be retrieved.

GMSPlacePhotoMetadata

@interface GMSPlacePhotoMetadata : NSObject

The metadata corresponding to a single photo associated with a place.

  • The data provider attribution string for this photo.

    These are provided as a NSAttributedString, which may contain hyperlinks to the website of each provider.

    In general, these must be shown to the user if data from this GMSPlacePhotoMetadata is shown, as described in the Places SDK Terms of Service.

    Declaration

    Swift

    @NSCopying var attributions: NSAttributedString? { get }

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSAttributedString *attributions;
  • The author attributions that must be shown to the user if this photo is displayed.

    Declaration

    Swift

    var authorAttributions: [GMSPlaceAuthorAttribution]? { get }

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSArray<GMSPlaceAuthorAttribution *> *authorAttributions;
  • The maximum pixel size in which this photo is available.

    Declaration

    Swift

    var maxSize: CGSize { get }

    Objective-C

    @property (nonatomic, readonly) CGSize maxSize;
  • Unavailable

    Initializer is not available.

    Declaration

    Objective-C

    - (nonnull instancetype)init;