SearchInAppsSDK Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
LocationSuggestionsContext
@objc
final class LocationSuggestionsContext
Context used for location-based search suggestions.
-
The requested Geo types. The supported types are:
- Food and Drink Geo types - ‘restaurant’, ‘cafe’, ‘bar’
- Leisure Geo types - ‘park’, ‘zoo’, ‘museum’, ‘attraction’
- Services Geo types - ‘atm’, ‘bank’, ‘hair_salon’, ‘real_estate_agency’
- Transportation Geo types - ‘bicycle_sharing_location’, ‘car_rental_agency’
- Shopping Geo types - ‘shopping_center’, ‘grocery_store’
- Lodging Geo types - ‘hotel’
Declaration
Swift
@objc
final var geoTypes: [String]?
-
Latitude in degrees. Must be in the range [-90.0, +90.0].
Declaration
Swift
@objc
final var latitude: Double
-
Longitude in degrees. Must be in the range [-180.0, +180.0].
Declaration
Swift
@objc
final var longitude: Double
-
The radius around lat-lng in meters.
Declaration
Swift
@objc
final var radiusMeters: NSNumber?
-
The start time of the time segment for which the search suggestions should apply.
Declaration
Swift
@objc
final var startTime: Date?
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-07 UTC."],[[["LocationSuggestionsContext is used for location-based search suggestions."],["It allows specifying desired Geo types like restaurants, parks, or hotels."],["It requires latitude and longitude coordinates for the search center."],["Users can define a search radius in meters around the specified location."],["Optionally, a start time can be set for the search suggestions."]]],["`LocationSuggestionsContext` facilitates location-based search suggestions. Key actions involve specifying `geoTypes` (e.g., restaurant, park), defining the search area using `latitude` ([-90.0, +90.0]), `longitude` ([-180.0, +180.0]), and `radiusMeters`. It also allows setting a `startTime` for time-specific suggestions. This class uses these parameters to refine the context for generating relevant location-based search suggestions.\n"]]