sdk / com.mapbox.search / SearchOptions

SearchOptions

data class SearchOptions : Parcelable

Search options, used for forward geocoding and category search.

Types

Builder

Builder for comfortable creation of SearchOptions instance.

class Builder

Constructors

<init>

Search options, used for forward geocoding and category search.

SearchOptions(proximity: Point? = null, boundingBox: BoundingBox? = null, countries: List<Country>? = null, fuzzyMatch: Boolean? = null, languages: List<Language>? = defaultSearchOptionsLanguage(), limit: Int? = null, types: List<QueryType>? = null, requestDebounce: Int? = null)

Properties

boundingBox

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

val boundingBox: BoundingBox?

countries

Limit results to one or more countries.

val countries: List<Country>?

fuzzyMatch

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.

val fuzzyMatch: Boolean?

languages

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.

val languages: List<Language>?

limit

Specify the maximum number of results to return. The maximum supported is 10.

val limit: Int?

proximity

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

val proximity: Point?

requestDebounce

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

val requestDebounce: Int?

types

Filter results to include only a subset (one or more) of the available feature types. Options are country, region, postcode, district, place, locality, neighborhood, address, and poi.

val types: List<QueryType>?