GMSPlaceSearchNearbyRequest Class Reference

GMSPlaceSearchNearbyRequest Class Reference

Overview

Request object to use with GMSPlacesClient to fetch nearby places.

Public Member Functions

(instancetype) - initWithLocationRestriction:placeProperties:
 Instantiates a GMSPlaceSearchNearbyRequest with a location restriction and place properties to return.

Properties

id< GMSPlaceLocationRestrictionlocationRestriction
 Default init is not available.
NSArray< GMSPlaceProperty > * placeProperties
 The array of GMSPlaceProperty that should be included in place results.
NSArray< NSString * > * includedTypes
 The array of place types to include in a search.
NSArray< NSString * > * excludedTypes
 The array of place types to exclude from a search.
NSArray< NSString * > * includedPrimaryTypes
 The array of primary place types to include in a search.
NSArray< NSString * > * excludedPrimaryTypes
 The array of primary places types to exclude from a search.
NSInteger maxResultCount
 The maximum number of GMSPlace results to return.
NSString * regionCode
 The unicode country/region code (CLDR) of the location where the request is coming from.
GMSPlaceSearchNearbyRankPreference rankPreference
 The GMSPlaceSearchNearbyRankPreference used to sort the results returned from the request.

Member Function Documentation

- (instancetype) initWithLocationRestriction: (id< GMSPlaceLocationRestriction >)  locationRestriction
placeProperties: (NSArray< GMSPlaceProperty > *)  placeProperties 

Instantiates a GMSPlaceSearchNearbyRequest with a location restriction and place properties to return.

Parameters:
locationRestrictionThe region to search specified as a circle, defined by center point and radius in meters.
placePropertiesThe array of GMSPlaceProperty that should be included in place results. Must not be empty. An empty list will result in an error when trying to send the request.

Property Documentation

- (id<GMSPlaceLocationRestriction>) locationRestriction [read, write, copy]

Default init is not available.

Please use the designated initializer. The region to search specified as a circle, defined by center point and radius in meters. The radius must be between 0.0 and 50000.0, inclusive. Breaking this restriction will result in an INVALID_ARGUMENT error. The locationRestriction must be specified with GMSPlaceCircularLocationOption. Using GMSPlaceRectangularLocationOption will result in an INVALID_REQUEST error.

- (NSArray<GMSPlaceProperty>*) placeProperties [read, write, copy]

The array of GMSPlaceProperty that should be included in place results.

Must not be empty. An empty list will result in an error when trying to send the request.

- (NSArray<NSString *>*) includedTypes [read, write, copy]

The array of place types to include in a search.

Up to 50 types can be specified. If a request is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. If the array is empty, then all places of all types are returned. See Table A for a list of supported types https://developers.google.com/maps/documentation/places/web-service/place-types#table-a.

- (NSArray<NSString *>*) excludedTypes [read, write, copy]

The array of place types to exclude from a search.

Up to 50 types can be specified. If a request is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. If conflicting types are specified (e.g., types appearing in includedTypes and excludedTypes), an INVALID_REQUEST error is returned. See Table A for a list of supported types https://developers.google.com/maps/documentation/places/web-service/place-types#table-a.

- (NSArray<NSString *>*) includedPrimaryTypes [read, write, copy]

The array of primary place types to include in a search.

Up to 50 types can be specified. If a request is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For more information about primary types see: https://developers.google.com/maps/documentation/places/web-service/nearby-search#includedtypesexcludedtypes,-includedprimarytypesexcludedprimarytypes

- (NSArray<NSString *>*) excludedPrimaryTypes [read, write, copy]

The array of primary places types to exclude from a search.

If conflicting types are specified (e.g., types appearing in includedTypes and excludedTypes), an INVALID_REQUEST error is returned. Up to 50 types can be specified. If a request is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For more information about primary types see: https://developers.google.com/maps/documentation/places/web-service/nearby-search#includedtypesexcludedtypes,-includedprimarytypesexcludedprimarytypes

- (NSInteger) maxResultCount [read, write, assign]

The maximum number of GMSPlace results to return.

Must be between 1 and 20 (default) inclusive. Breaking this restriction will result in an error returned.

- (NSString*) regionCode [read, write, copy]

The unicode country/region code (CLDR) of the location where the request is coming from.

See https://www.unicode.org/cldr/charts/44/supplemental/territory_language_information.html for region codes.

- (GMSPlaceSearchNearbyRankPreference) rankPreference [read, write, assign]

The GMSPlaceSearchNearbyRankPreference used to sort the results returned from the request.

The default value is GMSPlaceSearchNearbyRankPopularity.