CategorySearchOptions

class CategorySearchOptions @JvmOverloads constructor(val proximity: Point? = null, val boundingBox: BoundingBox? = null, val countries: List<IsoCountryCode>? = null, val fuzzyMatch: Boolean? = null, val languages: List<IsoLanguageCode>? = defaultSearchOptionsLanguage(), val limit: Int? = null, val requestDebounce: Int? = null, val origin: Point? = null, val navigationProfile: NavigationProfile? = null, val routeOptions: RouteOptions? = null, val unsafeParameters: Map<String, String>? = null, val ignoreIndexableRecords: Boolean = false, val indexableRecordsDistanceThresholdMeters: Double? = null) : Parcelable

Search options, used for category search.

See also

Constructors

Link copied to clipboard
fun CategorySearchOptions(proximity: Point? = null, boundingBox: BoundingBox? = null, countries: List<IsoCountryCode>? = null, fuzzyMatch: Boolean? = null, languages: List<IsoLanguageCode>? = defaultSearchOptionsLanguage(), limit: Int? = null, requestDebounce: Int? = null, origin: Point? = null, navigationProfile: NavigationProfile? = null, routeOptions: RouteOptions? = null, unsafeParameters: Map<String, String>? = null, ignoreIndexableRecords: Boolean = false, indexableRecordsDistanceThresholdMeters: Double? = null)

Types

Link copied to clipboard
class Builder

Builder for comfortable creation of CategorySearchOptions instance.

Functions

Link copied to clipboard
fun copy(proximity: Point? = this.proximity, boundingBox: BoundingBox? = this.boundingBox, countries: List<IsoCountryCode>? = this.countries, fuzzyMatch: Boolean? = this.fuzzyMatch, languages: List<IsoLanguageCode>? = this.languages, limit: Int? = this.limit, requestDebounce: Int? = this.requestDebounce, origin: Point? = this.origin, navigationProfile: NavigationProfile? = this.navigationProfile, routeOptions: RouteOptions? = this.routeOptions, unsafeParameters: Map<String, String>? = this.unsafeParameters, ignoreIndexableRecords: Boolean = this.ignoreIndexableRecords, indexableRecordsDistanceThresholdMeters: Double? = this.indexableRecordsDistanceThresholdMeters): CategorySearchOptions

Creates new CategorySearchOptions from current instance.

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Link copied to clipboard
val boundingBox: BoundingBox? = null

Limit results to only those contained within the supplied bounding box. The bounding box cannot cross the 180th meridian.

Link copied to clipboard
val countries: List<IsoCountryCode>? = null

Limit results to one or more countries.

Link copied to clipboard
val fuzzyMatch: Boolean? = null

Specify whether the Geocoding API should attempt approximate, as well as exact, matching when performing searches (true, default), or whether it should opt out of this behavior and only attempt exact matching (false). For example, the default setting might return Washington, DC for a query of Washington, even though the query was misspelled.

Link copied to clipboard

Specify whether to ignore com.mapbox.search.record.IndexableRecord results or not, default is false. When search by com.mapbox.search.record.IndexableRecord is enabled, the results can be matched only by query string, while other parameters like countries, languages, unsafeParameters (and some others) can be ignored.

Link copied to clipboard

Allows to look up for indexable records only within specified distance threshold, i.e. within a circle with this radius. Threshold specified in meters.

Link copied to clipboard
val languages: List<IsoLanguageCode>?

Specify the user’s language. This parameter controls the language of the text supplied in responses, and also affects result scoring, with results matching the user’s query in the requested language being preferred over results that match in another language. For example, an autocomplete query for things that start with Frank might return Frankfurt as the first result with an English (en) language parameter, but Frankreich (“France”) with a German (de) language parameter. If language is not set explicitly, then language from default system locale will be used.

Link copied to clipboard
val limit: Int? = null

Specify the maximum number of results to return, including results from com.mapbox.search.record.IndexableDataProvider. The maximum number of search results returned from the server is 10.

Link copied to clipboard
val navigationProfile: NavigationProfile? = null

Type of movement. Used to alter search ranking logic: the faster you can walk/drive from the origin to the search result, the higher search result rank.

Link copied to clipboard
val origin: Point? = null

Point for alternative search ranking logic, that is turned on if navigationProfile is specified.

Link copied to clipboard
val proximity: Point? = null

Bias the response to favor results that are closer to this location, provided as Point.

Link copied to clipboard
val requestDebounce: Int? = null

Request debounce value in milliseconds. Previous request will be cancelled if the new one made within specified by requestDebounce time interval.

Link copied to clipboard

Options to configure Route for search along the route functionality.

Link copied to clipboard

Non-verified query parameters, that will be added to the server API request.