Classes
The following classes are available globally.
-
Represents a component of an address, e.g., street number, postcode, city, etc.
Declaration
Swift
class GMSAddressComponent : NSObject
Objective-C
@interface GMSAddressComponent : NSObject
-
GMSAutocompleteFetcher
is a wrapper around the lower-level autocomplete APIs that encapsulates some of the complexity of requesting autocomplete predictions as the user is typing. Calling sourceTextHasChanged will generally result in the provided delegate being called with autocomplete predictions for the queried text, with the following provisos:- The fetcher may not necessarily request predictions on every call of sourceTextHasChanged if several requests are made within a short amount of time.
- The delegate will only be called with prediction results if those predictions are for the text supplied in the most recent call to sourceTextHasChanged.
Declaration
Swift
class GMSAutocompleteFetcher : NSObject
Objective-C
@interface GMSAutocompleteFetcher : NSObject
-
This class represents a set of restrictions that may be applied to autocomplete requests. This allows customization of autocomplete suggestions to only those places that are of interest.
Declaration
Swift
class GMSAutocompleteFilter : NSObject
Objective-C
@interface GMSAutocompleteFilter : NSObject
-
This class represents a matched fragment of a string. This is a contiguous range of characters in a string, suitable for highlighting in an autocompletion UI.
Declaration
Swift
class GMSAutocompleteMatchFragment : NSObject
Objective-C
@interface GMSAutocompleteMatchFragment : NSObject
-
This class represents a place suggestion of a full query based on a partially typed string.
Declaration
Swift
class GMSAutocompletePlaceSuggestion : NSObject
Objective-C
@interface GMSAutocompletePlaceSuggestion : NSObject
-
This class represents a prediction of a full query based on a partially typed string.
Declaration
Swift
class GMSAutocompletePrediction : NSObject
Objective-C
@interface GMSAutocompletePrediction : NSObject
-
The request for autocomplete data.
Declaration
Swift
class GMSAutocompleteRequest : NSObject
Objective-C
@interface GMSAutocompleteRequest : NSObject
-
GMSAutocompleteResultsViewController
provides an interface that displays place autocomplete predictions in a table view. The table view will be automatically updated as input text changes.This class is intended to be used as the search results controller of a UISearchController. Pass an instance of
GMSAutocompleteResultsViewController
to UISearchController’s initWithSearchResultsController method, then set the controller as the UISearchController’s searchResultsUpdater property.Use the
GMSAutocompleteResultsViewControllerDelegate
delegate protocol to be notified when a place is selected from the list.Declaration
Swift
class GMSAutocompleteResultsViewController : UIViewController, UISearchResultsUpdating
Objective-C
@interface GMSAutocompleteResultsViewController : UIViewController <UISearchResultsUpdating>
-
This class represents a session token to uniquely identify a series of queries to the Google Places API Services for fetching place predictions for a partial search string.
Declaration
Swift
class GMSAutocompleteSessionToken : NSObject
Objective-C
@interface GMSAutocompleteSessionToken : NSObject
-
This class represents a suggestion of a full query based on a partially typed string.
Declaration
Swift
class GMSAutocompleteSuggestion : NSObject
Objective-C
@interface GMSAutocompleteSuggestion : NSObject
-
GMSAutocompleteTableDataSource
provides an interface for providing place autocomplete predictions to populate a UITableView by implementing the UITableViewDataSource and UITableViewDelegate protocols.GMSAutocompleteTableDataSource
is designed to be used as the data source for a UISearchDisplayController.NOTE:
UISearchDisplayController
has been deprecated since iOS 8. It is now recommended to use UISearchController withGMSAutocompleteResultsViewController
to display autocomplete results using the iOS search UI.Set an instance of
GMSAutocompleteTableDataSource
as the searchResultsDataSource and searchResultsDelegate properties ofUISearchDisplayController
. In your implementation ofshouldReloadTableForSearchString
, callsourceTextHasChanged
with the current search string.Use the
GMSAutocompleteTableDataSourceDelegate
delegate protocol to be notified when a place is selected from the list. Because autocomplete predictions load asynchronously, it is necessary to implementdidUpdateAutocompletePredictions
and call reloadData on theUISearchDisplayController
‘s table view.Declaration
Swift
class GMSAutocompleteTableDataSource : NSObject, UITableViewDataSource, UITableViewDelegate
Objective-C
@interface GMSAutocompleteTableDataSource : NSObject <UITableViewDataSource, UITableViewDelegate>
-
GMSAutocompleteViewController
provides an interface that displays a table of autocomplete predictions that updates as the user enters text. Place selections made by the user are returned to the app via theGMSAutocompleteViewControllerResultsDelegate
protocol.To use
GMSAutocompleteViewController
, set its delegate to an object in your app that conforms to theGMSAutocompleteViewControllerDelegate
protocol and present the controller (eg using presentViewController). TheGMSAutocompleteViewControllerDelegate
delegate methods can be used to determine when the user has selected a place or has cancelled selection.Declaration
Swift
class GMSAutocompleteViewController : UIViewController
Objective-C
@interface GMSAutocompleteViewController : UIViewController
-
Request object to use with
GMSPlacesClient
to fetch a photo.Declaration
Swift
class GMSFetchPhotoRequest : NSObject
Objective-C
@interface GMSFetchPhotoRequest : NSObject
-
Request object to use with
GMSPlacesClient
to fetch a place.Declaration
Swift
class GMSFetchPlaceRequest : NSObject
Objective-C
@interface GMSFetchPlaceRequest : NSObject
-
A class representing time in hours and minutes in a 24hr clock.
Declaration
Swift
class GMSTime : NSObject
Objective-C
@interface GMSTime : NSObject
-
A class representing a open/close event in
GMSPeriod
.Declaration
Swift
class GMSEvent : NSObject
Objective-C
@interface GMSEvent : NSObject
-
A class to handle storing and accessing opening hours information for
GMSPlace
.Declaration
Swift
class GMSOpeningHours : NSObject
Objective-C
@interface GMSOpeningHours : NSObject
-
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.Declaration
Swift
class GMSPlace : NSObject
Objective-C
@interface GMSPlace : NSObject
-
A class representing an author attribution.
Declaration
Swift
class GMSPlaceAuthorAttribution : NSObject
Objective-C
@interface GMSPlaceAuthorAttribution : NSObject
-
Represents an is open request definition to be sent via
GMSPlacesClient
.Declaration
Swift
class GMSPlaceIsOpenRequest : NSObject
Objective-C
@interface GMSPlaceIsOpenRequest : NSObject
-
The response object for the
isOpenWithRequest:callback:
method.Declaration
Swift
class GMSPlaceIsOpenResponse : NSObject
Objective-C
@interface GMSPlaceIsOpenResponse : NSObject
-
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, seeGMSPlaceLikelihoodList
.Declaration
Swift
class GMSPlaceLikelihood : NSObject, NSCopying
Objective-C
@interface GMSPlaceLikelihood : NSObject <NSCopying>
-
Represents a list of places with an associated likelihood for the place being the correct place. For example, the Places service may be uncertain what the true Place is, but think it 55% likely to be PlaceA, and 35% likely to be PlaceB. The corresponding likelihood list has two members, one with likelihood 0.55 and the other with likelihood 0.35. The likelihoods are not guaranteed to be correct, and in a given place likelihood list they may not sum to 1.0.
Declaration
Swift
class GMSPlaceLikelihoodList : NSObject
Objective-C
@interface GMSPlaceLikelihoodList : NSObject
-
The metadata corresponding to a single photo associated with a place.
Declaration
Swift
class GMSPlacePhotoMetadata : NSObject
Objective-C
@interface GMSPlacePhotoMetadata : NSObject
-
A list of
GMSPlacePhotoMetadata
objects.Declaration
Swift
class GMSPlacePhotoMetadataList : NSObject
Objective-C
@interface GMSPlacePhotoMetadataList : NSObject
-
This class represents a single place review.
Declaration
Swift
class GMSPlaceReview : NSObject
Objective-C
@interface GMSPlaceReview : NSObject
-
Represents a text search request definition to be sent via
GMSPlacesClient
.Declaration
Swift
class GMSPlaceSearchByTextRequest : NSObject
Objective-C
@interface GMSPlaceSearchByTextRequest : NSObject
-
Request object to use with
GMSPlacesClient
to fetch nearby places.Declaration
Swift
class GMSPlaceSearchNearbyRequest : NSObject
Objective-C
@interface GMSPlaceSearchNearbyRequest : NSObject
-
Represents information on a particular day which may have opening hours different than normal.
Declaration
Swift
class GMSPlaceSpecialDay : NSObject
Objective-C
@interface GMSPlaceSpecialDay : NSObject
-
GMSPlaceViewportInfo
represents a rectangular bounding box on the Earth’s surface.GMSPlaceViewportInfo
is immutable and can’t be modified after construction.Declaration
Swift
class GMSPlaceViewportInfo : NSObject
Objective-C
@interface GMSPlaceViewportInfo : NSObject
-
Main interface to the Places SDK. Used for searching and getting details about places. This class should be accessed through the
[GMSPlacesClient sharedClient]
method.GMSPlacesClient
methods should only be called from the main thread. Calling these methods from another thread will result in an exception or undefined behavior. Unless otherwise specified, all callbacks will be invoked on the main thread.Declaration
Swift
class GMSPlacesClient : NSObject
Objective-C
@interface GMSPlacesClient : NSObject
-
A class containing the Plus codes representation for a location. See https://plus.codes/ for more details.
Declaration
Swift
class GMSPlusCode : NSObject
Objective-C
@interface GMSPlusCode : NSObject