-
Undocumented
Declaration
Swift
public let apiType: ApiType
-
Basic internal initializer
Declaration
Swift
public convenience init( accessToken: String? = nil, locationProvider: LocationProvider? = DefaultLocationProvider(), apiType: ApiType = .defaultType )
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
apiType
-
Search for places nearby the specified geographic point.
Declaration
Parameters
item
Search item
proximity
Geographic point to search nearby.
options
Search options
completion
Result 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
query
Search query
region
Limit results to only those contained within the supplied bounding box.
proximity
Optional geographic point to search nearby.
options
Search options
completion
Result 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
item
Search item
route
Route to search across (points and deviation options).
options
Search options
completion
Result 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