Skip to content

Commit

Permalink
Remove Discover.Options.country nil to .default assignment - SSDK-399
Browse files Browse the repository at this point in the history
- Add docs for origin and proximity
  • Loading branch information
aokj4ck committed Feb 14, 2024
1 parent 807ac1b commit 90f8abb
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ extension Discover {
public let language: Language

/// See ``MapboxSearch.Country.ISO3166_1_alpha2`` for the list of ISO 3166 alpha 2 country codes.
/// The default value will be selected from the Country.ISO3166\_1\_alpha2 identifiers based on the current
/// locale identifier or nil if no match is found.
/// The default value is nil.
public let country: Country?

/// Bias the response to favor results that are closer to a specific location.
/// When both proximity and origin are provided, origin is interpreted as the target of a route, while proximity
/// indicates the current user location.
public let proximity: CLLocationCoordinate2D?

/// The location from which to calculate distance. When both proximity and origin are provided, origin is
/// interpreted as the target of a route, while proximity indicates the current user location.
public let origin: CLLocationCoordinate2D?

public init(
Expand All @@ -33,7 +37,7 @@ extension Discover {
) {
self.limit = limit
self.language = language ?? .default
self.country = country ?? .default
self.country = country
self.proximity = proximity
self.origin = origin
}
Expand Down

0 comments on commit 90f8abb

Please sign in to comment.