GooglePlacesSwift Framework Reference

PlaceProtocol

protocol PlaceProtocol : CustomStringConvertible, Hashable

Undocumented

  • Name of the place.

    Declaration

    Swift

    var displayName: String? { get }
  • Place ID of this place.

    Declaration

    Swift

    var placeID: String? { get }
  • The location coordinates of the place.

    The location is not necessarily the center of the Place, or any particular entry or exit point, but some arbitrarily chosen point within the geographic extent of the Place.

    Declaration

    Swift

    var location: CLLocationCoordinate2D { get }
  • The phone number of this place, in international format.

    i.e. including the country code prefixed with “+”. For example, Google Sydney’s phone number is “+61 2 9374 4000”.

    Declaration

    Swift

    var internationalPhoneNumber: String? { get }
  • A string containing the human-readable address of this place.

    Often this address is equivalent to the postal address. Note that some countries, such as the United Kingdom, do not allow distribution of true postal addresses due to licensing restrictions.

    The formatted address is logically composed of one or more address components. For example, the address “111 8th Avenue, New York, NY” consists of the following components: “111” (the street number), “8th Avenue” (the route), “New York” (the city) and “NY” (the US state).

    Do not parse the formatted address programmatically. Instead you should use the individual address components, which the API response includes in addition to the formatted address field.

    Declaration

    Swift

    var formattedAddress: String? { get }
  • Five-star rating for this place based on user reviews.

    Ratings range from 1.0 to 5.0. nil if we have no rating for this place (e.g. because not enough users have reviewed this place).

    Declaration

    Swift

    var rating: Float? { get }
  • An array of Reviews representing the user reviews of the place.

    Declaration

    Swift

    var reviews: [Review] { get }
  • Price level for this place.

    Declaration

    Swift

    var priceLevel: PriceLevel { get }
  • The types of this place.

    Types are PlaceType, whose raw string values are any types documented at https://developers.google.com/places/ios-sdk/supported_types.

    Declaration

    Swift

    var types: Set<PlaceType> { get }
  • The website for this place.

    Declaration

    Swift

    var websiteURL: URL? { get }
  • The data provider attribution string for this place.

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

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

    Declaration

    Swift

    var attributions: AttributedString? { get }
  • The data provider attribution string for this place.

    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 Place is shown, as described in the Places SDK Terms of Service.

    Declaration

    Swift

    var legacyAttributions: NSAttributedString? { get }
  • The recommended viewport for this place. May be nil if the size of the place is not known.

    This returns a viewport of a size that is suitable for displaying this place. For example, a Place object representing a store may have a relatively small viewport, while a Place object representing a country may have a very large viewport.

    Declaration

    Swift

    var viewportInfo: RectangularCoordinateRegion? { get }
  • An array of AddressComponent objects representing the components in the place’s address.

    These components are provided for the purpose of extracting structured information about the place’s address: for example, finding the city that a place is in.

    These components should not be used for address formatting. If a formatted address is required, use the formattedAddress property.

    Declaration

    Swift

    var addressComponents: [AddressComponent]? { get }
  • The Plus code representation of location for this place.

    Declaration

    Swift

    var plusCode: PlusCode? { get }
  • The normal business Opening Hours information for this place.

    Includes open status, periods and weekday text when available.

    Declaration

    Swift

    var regularOpeningHours: OpeningHours? { get }
  • Returns this place’s hours of operation over the next seven days.

    The time period starts at midnight on the date of the request and ends at 11:59 pm six days later.

    SpecialDay entries on OpeningHours will only be present for Place currentOpeningHours and Place secondaryOpeningHours.

    Declaration

    Swift

    var currentOpeningHours: OpeningHours? { get }
  • Returns an array of this place’s secondary hour(s) of operation over the next seven days.

    Secondary hours are different from a business’s main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours.

    See HoursType for the different types of secondary hours.

    SpecialDay entries on OpeningHours will only be present for Place currentOpeningHours and Place currentSecondaryOpeningHours.

    Declaration

    Swift

    var currentSecondaryOpeningHours: [OpeningHours]? { get }
  • Represents how many reviews make up this place’s rating.

    Declaration

    Swift

    var numberOfUserRatings: Int { get }
  • An array of Photo objects representing the photos of the place.

    Declaration

    Swift

    var photos: [Photo]? { get }
  • The timezone UTC offset of the place in minutes.

    Declaration

    Swift

    var timeZone: TimeZone? { get }
  • The BusinessStatus of the place.

    Declaration

    Swift

    var businessStatus: BusinessStatus { get }
  • Returns this place’s editorial summary.

    Declaration

    Swift

    var editorialSummary: String? { get }
  • Background color of the icon according to Place type, to color the view behind the icon.

    Declaration

    Swift

    var iconBackgroundColor: UIColor? { get }
  • The URL to a PNG icon mask.

    Note

    URL link does not expire and the image size aspect ratio may be different depending on type.

    Declaration

    Swift

    var iconMaskURL: URL? { get }
  • Place Attribute for takeout experience.

    Declaration

    Swift

    var supportsTakeout: Bool? { get }
  • Place Attribute for delivery services.

    Declaration

    Swift

    var supportsDelivery: Bool? { get }
  • Place Attribute for dine in experience.

    Declaration

    Swift

    var supportsDineIn: Bool? { get }
  • Place Attribute for curbside pickup services.

    Declaration

    Swift

    var supportsCurbsidePickup: Bool? { get }
  • Place Attribute indicating place is popular with tourists.

    Declaration

    Swift

    var isReservable: Bool? { get }
  • Place Attribute indicating place serves breakfast.

    Declaration

    Swift

    var servesBreakfast: Bool? { get }
  • Place Attribute indicating place serves lunch.

    Declaration

    Swift

    var servesLunch: Bool? { get }
  • Place Attribute indicating place serves dinner.

    Declaration

    Swift

    var servesDinner: Bool? { get }
  • Place Attribute indicating place serves beer.

    Declaration

    Swift

    var servesBeer: Bool? { get }
  • Place Attribute indicating place serves wine.

    Declaration

    Swift

    var servesWine: Bool? { get }
  • Place Attribute indicating place serves brunch.

    Declaration

    Swift

    var servesBrunch: Bool? { get }
  • Place Attribute indicating place serves vegetarian food.

    Declaration

    Swift

    var servesVegetarianFood: Bool? { get }
  • Place Attribute indicating place is wheelchair accessible at the entrance.

    Declaration

    Swift

    var accessibilityOptions: AccessibilityOptions? { get }