Classes
The following classes are available globally.
-
A single custom POI that can be injected into the search engine.
See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public final class CustomPOI
-
Allows injecting custom POI data into the search engine.
See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
final public class CustomPOIProvider
-
Represents the response of the Autocomplete Search API, containing a summary and a list of autocomplete results.
autocomplete(options:completion:)usesAutocompleteResponseto encapsulate the results for an autocomplete request.An example usage of
AutocompleteResponse:
See morelet options = AutocompleteOptions( query: "mar", position: .AMSTERDAM, radius: Measurement(value: 100, unit: .kilometers) ) search.autocomplete(options: options) { result in switch result { case let .success(response): response.results.forEach { result in result.segments.forEach { segment in switch segment { case .brand(let brand): print("\(brand.brand.name) - brand") case .poiCategory(let category): print("\(category.poiCategory.name) - category") case .plainText(let text): print("\(text.plainText) - plain text") @unknown default: print("unknown") } } } case let .failure(error): print("Handle error: \(error)" ) } } // Prints: // Market - category // Marqt - brand // Marina - category // Marriott - brandDeclaration
Swift
public class AutocompleteResponse
-
AutocompleteSummaryprovides information about an autocomplete request that was performed.This class is part of the
See moreAutocompleteResponsedefinition. It contains the query phrase and geo-bias information.Declaration
Swift
public class AutocompleteSummary
-
AutocompleteGeoBiasrepresents geographical bias used by the autocomplete engine to improve search results.AutocompleteGeoBiasis part of the definition forAutocompleteSummarywhich is returned from theSearch.autocomplete(options:completion:)method.Fox example, for the geobias Amsterdam query “Fie” can return the autocomplete result “Fietsenwinkel.nl”, for the geobias Berlin query “Fie” can return the autocomplete result “Fielmann”.
See moreDeclaration
Swift
public class AutocompleteGeoBias
-
The result returned by the autocomplete search.
An
AutocompleteResultobject includes an array of segments that correspond to recognized entities. These entities can bebrand,poiCategory, orplainText.When the query contains multiple recognized entities, a single autocomplete result may contain multiple segments. For instance, if a user enters the query “Chess Bis,” the autocomplete search result could include 2 segments: a plain text segment containing “Chess” and a category segment with “Bistro.”
Instances of this class are utilized as components of the
See moreSearch.autocomplete(options:completion:)method, accessible through theAutocompleteResponse.resultsproperty.Declaration
Swift
public class AutocompleteResult
Classes Reference