-
Undocumented
Declaration
Swift
public let apiType: ApiType -
Basic internal initializer
Declaration
Swift
public convenience init( accessToken: String? = nil, locationProvider: LocationProvider? = DefaultLocationProvider(), apiType: ApiType = .searchBox )Parameters
accessTokenMapbox Access Token to be used. Info.plist value for key
MBXAccessTokenwill be used fornilargumentlocationProviderProvider configuration of
LocationProviderthat would grant location data by defaultapiTypeSpecifies which API provider to use through this search feature. Defaults to
searchBox. -
Search for places nearby the specified geographic point.
Declaration
Parameters
itemSearch item
proximityGeographic point to search nearby.
optionsSearch options
completionResult of the search request, one of error or value.
-
Search for places nearby the specified geographic point.
Declaration
Swift
public func search( for item: Discover.Query, in region: BoundingBox, proximity: CLLocationCoordinate2D? = nil, options: Options = .init(), completion: @escaping (Swift.Result<[Result], Error>) -> Void )Parameters
itemSearch query.
regionLimit results to only those contained within the supplied bounding box.
proximityOptional geographic point to search nearby.
optionsSearch options
completionResult of the search request, one of error or value.
-
Search for places nearby the specified geographic point.
Declaration
Swift
public func search( for item: Discover.Query, route: RouteOptions, options: Options = .init(), completion: @escaping (Swift.Result<[Result], Error>) -> Void )Parameters
itemSearch item
routeRoute to search across (points and deviation options).
optionsSearch options
completionResult of the search request, one of error or value.
-
Undocumented
See moreDeclaration
Swift
public struct Address -
Wraps parameters for Discover/Category searches. Use this to provide arguments that narrow your search.
See moreDeclaration
Swift
public struct Options -
String representing a category name to be searched for. Use one of the suggested categories listed in the enum extension or search for a given string.
See moreDeclaration
Swift
public struct Query -
Undocumented
See moreDeclaration
Swift
public struct Result
Discover Class Reference