StructuredSearchCandidate
public struct StructuredSearchCandidate : Equatable
Represents a possible next level within structured (hierarchical) search or its destination.
A user proceeds with structured search using StructuredSearchSession
by selecting next candidate.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates a new
StructuredSearchCandidate
instance with the given parameters.Important
shouldn’t be used to create candidates outside the TomTomSDK.Declaration
Swift
public init(candidateType: CandidateType, place: Place, displayString: String, supplementaryString: String = "")
Parameters
candidateType
defines the type of the candidate.
place
a place representing the current candidate on a map and related data.
displayString
a string that visually represents the candidate data.
supplementaryString
a string that provides additional textual information about the candidate.
-
Defines the address level within the hierarchical type.
Declaration
Swift
public let candidateType: CandidateType
-
The string representing the candidate and usually used to display to end user. The string depends on the language of [StructuredSearchApi.createSearchSession]. E.g. “Tokyo” in English, and “東京都” in Japanese.
Declaration
Swift
public let displayString: String
-
The supplementary string is an alternative representation of the candidate. The string is not for displaying but maybe used to create interface elements such as buttons or selection tools. The context and usage depend on language and region, and could be empty if not applicable. E.g. the supplementary string is “トウキヨウ” (Tokyo written in Katakana) while the display string is “東京都” (Tokyo written in Kanji).
Declaration
Swift
public let supplementaryString: String