Overview
Represents a particular physical place.
A GMSPlace encapsulates information about a physical location, including its name, location, and any other information we might have about it. This class is immutable.
Public Member Functions | |
(GMSPlaceOpenStatus) | - isOpenAtDate: |
Default init is not available. | |
(GMSPlaceOpenStatus) | - isOpen |
Calculates if a place is open based on openingHours , UTCOffsetMinutes , and current date and time obtained from [NSDate date] . | |
Properties | |
NSString * | name |
Name of the place. | |
NSString * | placeID |
Place ID of this place. | |
CLLocationCoordinate2D | coordinate |
Location of the place. | |
NSString * | phoneNumber |
Phone number of this place, in international format, i.e. | |
NSString * | formattedAddress |
Address of the place as a simple string. | |
float | rating |
Five-star rating for this place based on user reviews. | |
NSArray< GMSPlaceReview * > * | reviews |
An array of GMSPlaceReview objects representing the user reviews of the place. | |
GMSPlacesPriceLevel | priceLevel |
Price level for this place, as integers from 0 to 4. | |
NSArray< NSString * > * | types |
The types of this place. | |
NSURL * | website |
Website for this place. | |
NSAttributedString * | attributions |
The data provider attribution string for this place. | |
GMSPlaceViewportInfo * | viewportInfo |
The recommended viewport for this place. | |
NSArray< GMSAddressComponent * > * | addressComponents |
An array of GMSAddressComponent objects representing the components in the place's address. | |
GMSPlusCode * | plusCode |
The Plus code representation of location for this place. | |
GMSOpeningHours * | openingHours |
The normal business Opening Hours information for this place. | |
GMSOpeningHours * | currentOpeningHours |
Returns this place's hours of operation over the next seven days. | |
NSArray< GMSOpeningHours * > * | secondaryOpeningHours |
Returns an array of this place's secondary hour(s) of operation over the next seven days. | |
NSUInteger | userRatingsTotal |
Represents how many reviews make up this place's rating. | |
NSArray< GMSPlacePhotoMetadata * > * | photos |
An array of GMSPlacePhotoMetadata objects representing the photos of the place. | |
NSNumber * | UTCOffsetMinutes |
The timezone UTC offset of the place in minutes. | |
GMSPlacesBusinessStatus | businessStatus |
The GMSPlaceBusinessStatus of the place. | |
NSString * | editorialSummary |
Returns this place's editorial summary. | |
UIColor * | iconBackgroundColor |
Background color of the icon according to Place type, to color the view behind the icon. | |
NSURL * | iconImageURL |
The URL according to Place type, which you can use to retrieve the NSData of the Place icon. | |
GMSBooleanPlaceAttribute | takeout |
Place Attribute for takeout experience. | |
GMSBooleanPlaceAttribute | delivery |
Place Attribute for delivery services. | |
GMSBooleanPlaceAttribute | dineIn |
Place Attribute for dine in experience. | |
GMSBooleanPlaceAttribute | curbsidePickup |
Place Attribute for curbside pickup services. | |
GMSBooleanPlaceAttribute | reservable |
Place Attribute indicating place is popular with tourists. | |
GMSBooleanPlaceAttribute | servesBreakfast |
Place Attribute indicating place serves breakfast. | |
GMSBooleanPlaceAttribute | servesLunch |
Place Attribute indicating place serves lunch. | |
GMSBooleanPlaceAttribute | servesDinner |
Place Attribute indicating place serves dinner. | |
GMSBooleanPlaceAttribute | servesBeer |
Place Attribute indicating place serves beer. | |
GMSBooleanPlaceAttribute | servesWine |
Place Attribute indicating place serves wine. | |
GMSBooleanPlaceAttribute | servesBrunch |
Place Attribute indicating place serves brunch. | |
GMSBooleanPlaceAttribute | servesVegetarianFood |
Place Attribute indicating place serves vegetarian food. | |
GMSBooleanPlaceAttribute | wheelchairAccessibleEntrance |
Place Attribute indicating place is wheelchair accessible at the entrance. |
Member Function Documentation
- (GMSPlaceOpenStatus) isOpenAtDate: | (NSDate *) | date |
Default init is not available.
Calculates if a place is open based on openingHours
, UTCOffsetMinutes
, and date
.
- Parameters:
-
date A reference point in time used to determine if the place is open.
- Returns:
- GMSPlaceOpenStatusOpen if the place is open, GMSPlaceOpenStatusClosed if the place is closed, and GMSPlaceOpenStatusUnknown if the open status is unknown.
- Note:
- This is deprecated. This method is deprecated in favor of
GMSPlacesClient::isOpenAtDate:place:date:callback</ code> and will be removed in a future release.
Calculates if a place is open based on openingHours
, UTCOffsetMinutes
, and current date and time obtained from [NSDate date]
.
- Returns:
- GMSPlaceOpenStatusOpen if the place is open, GMSPlaceOpenStatusClosed if the place is closed, and GMSPlaceOpenStatusUnknown if the open status is unknown.
- Note:
- This is deprecated. This method is deprecated in favor of
GMSPlacesClient::isOpen:place:callback
and will be removed in a future release.
Property Documentation
- (NSString*) name [read, copy] |
Name of the place.
- (NSString*) placeID [read, copy] |
Place ID of this place.
- (CLLocationCoordinate2D) coordinate [read, assign] |
Location 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.
- (NSString*) phoneNumber [read, copy] |
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".
- (NSString*) formattedAddress [read, copy] |
Address of the place as a simple string.
- (float) rating [read, assign] |
Five-star rating for this place based on user reviews.
Ratings range from 1.0 to 5.0. 0.0 means we have no rating for this place (e.g. because not enough users have reviewed this place).
- (NSArray<GMSPlaceReview *>*) reviews [read, copy] |
An array of GMSPlaceReview
objects representing the user reviews of the place.
- (GMSPlacesPriceLevel) priceLevel [read, assign] |
Price level for this place, as integers from 0 to 4.
e.g. A value of 4 means this place is "$$$$" (expensive). A value of 0 means free (such as a museum with free admission).
- (NSArray<NSString *>*) types [read, copy] |
The types of this place.
Types are NSStrings, valid values are any types documented at <https://developers.google.com/places/ios-sdk/supported_types>.
- (NSURL*) website [read, copy] |
Website for this place.
- (NSAttributedString*) attributions [read, copy] |
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 GMSPlace is shown, as described in the Places SDK Terms of Service.
- (GMSPlaceViewportInfo*) viewportInfo [read, assign] |
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 GMSPlace
object representing a store may have a relatively small viewport, while a GMSPlace
object representing a country may have a very large viewport.
- (NSArray<GMSAddressComponent *>*) addressComponents [read, copy] |
An array of GMSAddressComponent
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, which provides a localized formatted address.
- (GMSPlusCode*) plusCode [read, assign] |
The Plus code representation of location for this place.
- (GMSOpeningHours*) openingHours [read, assign] |
The normal business Opening Hours information for this place.
Includes open status, periods and weekday text when available.
- (GMSOpeningHours*) currentOpeningHours [read, assign] |
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.
GMSPlaceSpecialDay
entries on GMSOpeningHours
will only be present for GMSPlace
currentOpeningHours
and GMSPlace
secondaryOpeningHours
.
- (NSArray<GMSOpeningHours *>*) secondaryOpeningHours [read, copy] |
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 GMSPlaceHoursType
for the different types of secondary hours.
GMSPlaceSpecialDay
entries on GMSOpeningHours
will only be present for GMSPlace
currentOpeningHours
and GMSPlace
secondaryOpeningHours
.
- (NSUInteger) userRatingsTotal [read, assign] |
Represents how many reviews make up this place's rating.
- (NSArray<GMSPlacePhotoMetadata *>*) photos [read, copy] |
An array of GMSPlacePhotoMetadata
objects representing the photos of the place.
- (NSNumber*) UTCOffsetMinutes [read, assign] |
The timezone UTC offset of the place in minutes.
- (GMSPlacesBusinessStatus) businessStatus [read, assign] |
The GMSPlaceBusinessStatus
of the place.
- (NSString*) editorialSummary [read, copy] |
Returns this place's editorial summary.
- (UIColor*) iconBackgroundColor [read, assign] |
Background color of the icon according to Place type, to color the view behind the icon.
- (NSURL*) iconImageURL [read, assign] |
The URL according to Place type, which you can use to retrieve the NSData of the Place icon.
NOTES: URL link does not expire and the image size aspect ratio may be different depending on type.
- (GMSBooleanPlaceAttribute) takeout [read, assign] |
Place Attribute for takeout experience.
- (GMSBooleanPlaceAttribute) delivery [read, assign] |
Place Attribute for delivery services.
- (GMSBooleanPlaceAttribute) dineIn [read, assign] |
Place Attribute for dine in experience.
- (GMSBooleanPlaceAttribute) curbsidePickup [read, assign] |
Place Attribute for curbside pickup services.
- (GMSBooleanPlaceAttribute) reservable [read, assign] |
Place Attribute indicating place is popular with tourists.
- (GMSBooleanPlaceAttribute) servesBreakfast [read, assign] |
Place Attribute indicating place serves breakfast.
- (GMSBooleanPlaceAttribute) servesLunch [read, assign] |
Place Attribute indicating place serves lunch.
- (GMSBooleanPlaceAttribute) servesDinner [read, assign] |
Place Attribute indicating place serves dinner.
- (GMSBooleanPlaceAttribute) servesBeer [read, assign] |
Place Attribute indicating place serves beer.
- (GMSBooleanPlaceAttribute) servesWine [read, assign] |
Place Attribute indicating place serves wine.
- (GMSBooleanPlaceAttribute) servesBrunch [read, assign] |
Place Attribute indicating place serves brunch.
- (GMSBooleanPlaceAttribute) servesVegetarianFood [read, assign] |
Place Attribute indicating place serves vegetarian food.
- (GMSBooleanPlaceAttribute) wheelchairAccessibleEntrance [read, assign] |
Place Attribute indicating place is wheelchair accessible at the entrance.