PlaceAutocomplete
public final class PlaceAutocomplete
Main entrypoint to the Mapbox Place Autocomplete SDK.
-
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
-
Undocumented
See moreDeclaration
Swift
struct Options -
Values to filter Place Autocomplete results to include only a subset (one or more) of the available feature types.
See moreDeclaration
Swift
enum PlaceType : Equatable -
Undocumented
See moreDeclaration
Swift
struct Result -
Undocumented
See moreDeclaration
Swift
struct Suggestion
-
Start searching for query with provided options
Declaration
Swift
func suggestions( for query: String, region: BoundingBox? = nil, proximity: CLLocationCoordinate2D? = nil, filterBy options: Options = .init(), completion: @escaping (Swift.Result<[Suggestion], Error>) -> Void )Parameters
querytext query for suggestions
proximityproximity Optional geographic point that bias the response to favor results that are closer to this location.
optionsSearch options used for filtration
-
Start searching for query with provided options
Declaration
Swift
func suggestions( for query: CLLocationCoordinate2D, filterBy options: Options = .init(), completion: @escaping (Swift.Result<[Suggestion], Error>) -> Void )Parameters
coordinatecoordinates query
optionsSearch options used for filtration
PlaceAutocomplete Class Reference