# GMSPlaceSearchNearbyRequest

    @interface GMSPlaceSearchNearbyRequest : NSObject

Request object to use with `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlacesClient.html` to fetch nearby places.
- `


  ### [-initWithLocationRestriction:placeProperties:](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchNearbyRequest#/c:objc(cs)GMSPlaceSearchNearbyRequest(im)initWithLocationRestriction:placeProperties:)


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

  #### Declaration

  Swift

      init(locationRestriction: any https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Protocols/GMSPlaceLocationRestriction.html, placeProperties: [String])

  Objective-C

      - (nonnull instancetype)
          initWithLocationRestriction:
              (nonnull id<https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Protocols/GMSPlaceLocationRestriction.html>)locationRestriction
                      placeProperties:(nonnull NSArray<NSString *> *)placeProperties;

  #### Parameters

  |---|---|
  | ` locationRestriction ` | The region to search specified as a circle, defined by center point and radius in meters. |
  | ` placeProperties ` | The array of `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Type-Definitions/GMSPlaceProperty.html` 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. |

- `


  ### [-init](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchNearbyRequest#/c:objc(cs)GMSPlaceSearchNearbyRequest(im)init)


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

  #### Declaration

  Objective-C

      - (nonnull instancetype)init;

- `


  ### [locationRestriction](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchNearbyRequest#/c:objc(cs)GMSPlaceSearchNearbyRequest(py)locationRestriction)


  ` 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
  `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Functions/GMSPlaceCircularLocationOption.html`. Using `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Functions/GMSPlaceRectangularLocationOption.html` will result in an
  INVALID_REQUEST error.

  #### Declaration

  Swift

      @NSCopying var locationRestriction: any https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Protocols/GMSPlaceLocationRestriction.html { get set }

  Objective-C

      @property (nonatomic, copy) id<https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Protocols/GMSPlaceLocationRestriction.html> _Nonnull locationRestriction;

- `


  ### [placeProperties](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchNearbyRequest#/c:objc(cs)GMSPlaceSearchNearbyRequest(py)placeProperties)


  ` The array of `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Type-Definitions/GMSPlaceProperty.html` 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.

  #### Declaration

  Swift

      var placeProperties: [String] { get set }

  Objective-C

      @property (nonatomic, copy) NSArray<NSString *> *_Nonnull placeProperties;

- `


  ### [includedTypes](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchNearbyRequest#/c:objc(cs)GMSPlaceSearchNearbyRequest(py)includedTypes)


  ` 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>.

  #### Declaration

  Swift

      var includedTypes: [String]? { get set }

  Objective-C

      @property (nonatomic, copy, nullable) NSArray<NSString *> *includedTypes;

- `


  ### [excludedTypes](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchNearbyRequest#/c:objc(cs)GMSPlaceSearchNearbyRequest(py)excludedTypes)


  ` 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>.

  #### Declaration

  Swift

      var excludedTypes: [String]? { get set }

  Objective-C

      @property (nonatomic, copy, nullable) NSArray<NSString *> *excludedTypes;

- `


  ### [includedPrimaryTypes](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchNearbyRequest#/c:objc(cs)GMSPlaceSearchNearbyRequest(py)includedPrimaryTypes)


  ` 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>

  #### Declaration

  Swift

      var includedPrimaryTypes: [String]? { get set }

  Objective-C

      @property (nonatomic, copy, nullable) NSArray<NSString *> *includedPrimaryTypes;

- `


  ### [excludedPrimaryTypes](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchNearbyRequest#/c:objc(cs)GMSPlaceSearchNearbyRequest(py)excludedPrimaryTypes)


  ` 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>

  #### Declaration

  Swift

      var excludedPrimaryTypes: [String]? { get set }

  Objective-C

      @property (nonatomic, copy, nullable) NSArray<NSString *> *excludedPrimaryTypes;

- `


  ### [maxResultCount](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchNearbyRequest#/c:objc(cs)GMSPlaceSearchNearbyRequest(py)maxResultCount)


  ` The maximum number of `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlace.html` results to return. Must be between 1 and 20 (default)
  inclusive. Breaking this restriction will result in an error returned.

  #### Declaration

  Swift

      var maxResultCount: Int { get set }

  Objective-C

      @property (nonatomic) NSInteger maxResultCount;

- `


  ### [regionCode](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchNearbyRequest#/c:objc(cs)GMSPlaceSearchNearbyRequest(py)regionCode)


  ` 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.

  #### Declaration

  Swift

      var regionCode: String? { get set }

  Objective-C

      @property (nonatomic, copy, nullable) NSString *regionCode;

- `


  ### [rankPreference](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchNearbyRequest#/c:objc(cs)GMSPlaceSearchNearbyRequest(py)rankPreference)


  ` The `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Enums/GMSPlaceSearchNearbyRankPreference.html` used to sort the results returned from the request.
  The default value is `GMSPlaceSearchNearbyRankPopularity`.

  #### Declaration

  Swift

      var rankPreference: https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Enums/GMSPlaceSearchNearbyRankPreference.html { get set }

  Objective-C

      @property (nonatomic) https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Enums/GMSPlaceSearchNearbyRankPreference.html rankPreference;

- `


  ### [routingParameters](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchNearbyRequest#/c:objc(cs)GMSPlaceSearchNearbyRequest(py)routingParameters)


  ` The routing parameters used to calculate the distance to the destination and the duration to
  travel to the destination.

  #### Declaration

  Swift

      var routingParameters: https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceRoutingParameters.html? { get set }

  Objective-C

      @property (nonatomic, nullable) https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceRoutingParameters.html *routingParameters;

- `


  ### [shouldIncludeRoutingSummaries](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceSearchNearbyRequest#/c:objc(cs)GMSPlaceSearchNearbyRequest(py)shouldIncludeRoutingSummaries)


  ` Whether results should contain routing summaries, default is false. To have routing summaries
  included in the result, `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSPlaceRoutingParameters.html#/c:objc(cs)GMSPlaceRoutingParameters(py)origin` must be set.

  #### Declaration

  Swift

      var shouldIncludeRoutingSummaries: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL shouldIncludeRoutingSummaries;