-
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
MGLMapboxAccessTokenwill be used fornilargumentlocationProviderProvider configuration of LocationProvider that would grant location data by default
-
Start searching for query with provided options
Declaration
Swift
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
-
Start searching for query with provided options
Declaration
Swift
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
-
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
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
struct AddressComponent : Equatable -
Undocumented
See moreDeclaration
Swift
struct Options -
Undocumented
See moreDeclaration
Swift
struct Query -
Undocumented
See moreDeclaration
Swift
struct Result -
Undocumented
See moreDeclaration
Swift
struct Suggestion
AddressAutofill Class Reference