-
Basic internal initializer
Declaration
Swift
public convenience init( accessToken: String? = nil, locationProvider: LocationProvider? = DefaultLocationProvider() )
Parameters
accessToken
Mapbox Access Token to be used. Info.plist value for key
MGLMapboxAccessToken
will be used fornil
argumentlocationProvider
Provider 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
query
query string to search
options
if no value provided Search Engine will use options from requestOptions field
-
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
coordinate
point Coordinate to resolve
options
if 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
public func select( suggestion: Suggestion, completion: @escaping ( Swift.Result<AddressAutofill.Result, Error> ) -> Void )
Parameters
suggestion
Suggestion to select.
completion
Result 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