GooglePlaces Framework Reference

  • GMSPlaceLikelihood represents a place and its likelihood of being the best match for a user's location.

  • It provides a place object containing details about the location and a likelihood value indicating confidence (0.0 to 1.0).

  • Higher likelihood values represent greater confidence that the user is at the specified place.

  • GMSPlaceLikelihood objects are typically used within a GMSPlaceLikelihoodList to present multiple location possibilities.

GMSPlaceLikelihood

@interface GMSPlaceLikelihood : NSObject <NSCopying>

Represents a GMSPlace and the relative likelihood of the place being the best match within the list of returned places for a single request. For more information about place likelihoods, see GMSPlaceLikelihoodList.

  • The place contained in this place likelihood.

    Declaration

    Swift

    var place: GMSPlace { get }

    Objective-C

    @property (nonatomic, strong, readonly) GMSPlace *_Nonnull place;
  • Returns a value from 0.0 to 1.0 indicating the confidence that the user is at this place. The larger the value the more confident we are of the place returned. For example, a likelihood of 0.75 means that the user is at least 75% likely to be at this place.

    Declaration

    Swift

    var likelihood: Double { get }

    Objective-C

    @property (nonatomic, readonly) double likelihood;
  • Declaration

    Swift

    init(place: GMSPlace, likelihood: Double)

    Objective-C

    - (instancetype)initWithPlace:(GMSPlace *)place
                       likelihood:(double)likelihood NS_DESIGNATED_INITIALIZER;
  • Unavailable

    Default init is not available. Please use the designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)init;