TKLocationProvider

public enum TKLocationProvider

Undocumented

  • Undocumented

    See more

    Declaration

    Swift

    public enum Error : Swift.Error
  • Fetches locations that are within the provided circle

    The observable can error out in cases where the circle is outside supported regions, or where the server could not be reached or returned an error.

    Declaration

    Swift

    public static func fetchLocations(center: CLLocationCoordinate2D, radius: CLLocationDistance, limit: Int = 100, modes: [String]? = nil, strictModeMatch: Bool = true) async throws -> [TKNamedCoordinate]

    Parameters

    center

    Centre coordinate of circle

    radius

    Radius of circle in metres

    limit

    Maximum number of locations to fetch, defaults to 100

    modes

    Modes for which to fetch locations. If not provided, will use all.

    strictModeMatch

    Should modes be treated strictly, or should related results also be returned?

    Return Value

    Observable of fetched locations; always returns empty array for international region; can error out

  • Undocumented

    Declaration

    Swift

    public static func fetchLocations(center: CLLocationCoordinate2D, radius: CLLocationDistance, limit: Int = 100, modes: [String]? = nil, strictModeMatch: Bool = true, in region: TKRegion) async throws -> [TKNamedCoordinate]