SearchNearbyRequest
struct SearchNearbyRequest
-
How results will be ranked in the response.
Declaration
Swift
enum RankPreference
extension SearchNearbyRequest.RankPreference : CaseIterable, Equatable, Hashable, Identifiable
-
The set of primary place types to exclude from a search. If conflicting types are specified (e.g., types appearing in
includedTypes
andexcludedTypes
), 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,-includedprimarytypesexcludedprimarytypesDeclaration
Swift
var excludedPrimaryTypes: Set<PlaceType>? { get }
-
The set 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
andexcludedTypes
), 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: Set<PlaceType>? { get }
-
The set 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: Set<PlaceType>? { get }
-
The set 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 set 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: Set<PlaceType>? { get }
-
init(locationRestriction:placeProperties:includedTypes:excludedTypes:includedPrimaryTypes:excludedPrimaryTypes:maxResultCount:rankPreference:regionCode:)
Instantiates a
SearchNearbyRequest
with a text query and place properties to return.Declaration
Swift
init(locationRestriction: any CoordinateRegionRestriction, placeProperties: [PlaceProperty], includedTypes: Set<PlaceType>? = nil, excludedTypes: Set<PlaceType>? = nil, includedPrimaryTypes: Set<PlaceType>? = nil, excludedPrimaryTypes: Set<PlaceType>? = nil, maxResultCount: Int = 20, rankPreference: SearchNearbyRequest.RankPreference = .popularity, regionCode: String? = nil)
-
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. The
locationRestriction
must be specified withCircularCoordinateRegion
. UsingRectangularCoordinateRegion
will result in an error.Declaration
Swift
var locationRestriction: any CoordinateRegionRestriction { get }
-
The maximum number of
Place
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 }
-
The array of
PlaceProperty
that should be included in place results.Declaration
Swift
var placeProperties: [PlaceProperty] { get }
-
The
SearchNearbyRequest.RankPreference
used to sort the results returned from the request. The default value is.distance.
*/Declaration
Swift
var rankPreference: SearchNearbyRequest.RankPreference { get }
-
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 }