TomTomSDKStructuredSearch
-
Represents a possible next level within structured (hierarchical) search or its destination. A user proceeds with structured search using
StructuredSearchSessionby selecting next candidate.See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public struct StructuredSearchCandidate : Equatable
-
The address level type for each
StructuredSearchCandidate.See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum CandidateType
-
A session represents the current state of the structured search process. The search proceeds as a series of steps and intermediate searches until the client reaches the destination address.
- The session starts with the
StructuredSearchSession.fetchStructuredSearchState(completion:)call, which returns the initial state. - Then, the client can select a candidate in the current step with the ‘StructuredSearchSession.selectCandidate(candidate:completion:)
call. [Optional] 3. After proceeding with the search, the client can go back to the previous step with theStructuredSearchSession.goBack(step:completion:)` call.
Here is a flow to get to the house address using Structured Search:
- prefecture/metropolitan -> municipality -> oaza -> chome/aza -> (gaiku-)houseNumber(-sub)
For example:
“Japan” -> “Saitama Prefecture” -> “Saitama City Minami Ward” -> “Negishi” -> “5 chome” -> “2-13-3”
Note
for more information, seeStructuredSearchdocumentation.Important
This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
public protocol StructuredSearchSession - The session starts with the
-
Represents current state of
StructuredSearchSessionduring the structured (hierarchical) search.StructuredSearchStateis provided by the search session until the search doesn’t reach the destination.See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public struct StructuredSearchState : Equatable
-
The Structured Search (hierarchical address selection) helps users find an address in structured address data (5-chōme 18-20 Daitakubo, Minami Ward, Saitama, Japan) by making a series of choices. Each choice leads users deeper into the hierarchy, moving from the highest level (country) down to the lowest (house number). At each step, the user is presented with options for the next level down. They can then either move forward by selecting a candidate or move back by undoing the previous selection.
See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public protocol StructuredSearch
-
General errors that may occur while performing structured searching.
See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum StructuredSearchError : LocalizedError, Equatable
-
Defines the result of current structured search. It’s either the end of the search (its destination) or options to proceed (search candidates).
See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum StructuredSearchResponse : Equatable
TomTomSDKStructuredSearch Reference