Discover

public final class Discover

Undocumented

  • 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 for nil argument

    locationProvider

    Provider configuration of LocationProvider that would grant location data by default

  • Search for places nearby the specified geographic point.

    Declaration

    Swift

    public func search(
        for query: Query,
        proximity: CLLocationCoordinate2D,
        options: Options = .init(),
        completion: @escaping (Swift.Result<[Result], Error>) -> Void
    )

    Parameters

    query

    Search query

    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 query: 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 query: Query,
        route: RouteOptions,
        options: Options = .init(),
        completion: @escaping (Swift.Result<[Result], Error>) -> Void
    )

    Parameters

    query

    Search query

    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 more

    Declaration

    Swift

    public struct Address
  • Undocumented

    See more

    Declaration

    Swift

    public struct Options
  • Undocumented

    See more

    Declaration

    Swift

    public struct Query
  • Undocumented

    See more

    Declaration

    Swift

    public struct Result