StructuredSearch
public protocol StructuredSearch
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.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Starts a new search session to find the full address hierarchically with preferred locale. The locale is used to find the best representation of strings in
StructuredSearchCandidate
, and can be changed later when operating withStructuredSearchSession
.Throws
An error if search session cannot be created.Declaration
Swift
func createSearchSession(locale: Locale) throws -> StructuredSearchSession
Parameters
locale
The preferred
Locale
.Return Value
A
StructuredSearchSession
object that could be used to perform structured search.