-
Basic internal initializer
Declaration
Swift
public convenience init( accessToken: String? = nil, locationProvider: LocationProvider? = DefaultLocationProvider() )Parameters
accessTokenMapbox Access Token to be used. Info.plist value for key
MBXAccessTokenwill be used fornilargumentlocationProviderProvider configuration of LocationProvider that would grant location data by default
-
Start searching for query with provided options
Declaration
Swift
public func suggestions( for query: Query, with options: Options? = nil, completion: @escaping (Swift.Result<[Suggestion], Error>) -> Void )Parameters
queryquery string to search
optionsif no value provided Search Engine will use options from requestOptions field
completionResult of the search request, one of error or value.
-
Start searching for query with provided options
Declaration
Swift
public func suggestions( for coordinate: CLLocationCoordinate2D, with options: Options? = nil, completion: @escaping (Swift.Result<[Suggestion], Error>) -> Void )Parameters
coordinatepoint Coordinate to resolve
optionsif no value provided Search Engine will use options from requestOptions field
completionResult of the search request, one of error or value.
-
Retrieves detailed information about the
AddressAutofill.Suggestion. Use this function to end search session even if you don’t need detailed information.Subject to change: in future, you may be charged for a suggestion call in case your UX flow accepts one of suggestions as selected and uses the coordinates, but you don’t call
select(suggestion:completion:)method to confirm this. Other than that suggestions calls are not billed.Declaration
Swift
public func select( suggestion: Suggestion, completion: @escaping ( Swift.Result<AddressAutofill.Result, Error> ) -> Void )Parameters
suggestionSuggestion to select.
completionResult of the suggestion selection, one of error or value.
-
Undocumented
See moreDeclaration
Swift
public struct AddressComponent : Equatable -
Undocumented
See moreDeclaration
Swift
public struct Options -
Undocumented
See moreDeclaration
Swift
public struct Query -
Undocumented
See moreDeclaration
Swift
public struct Result -
Undocumented
See moreDeclaration
Swift
public struct Suggestion
AddressAutofill Class Reference