MapboxParameters

class MapboxParameters(val permanent: Boolean = false, val autocomplete: Boolean = true, val limit: Int? = null, val bbox: MapboxBoundingBox? = null, val country: String? = null, val language: String? = null, val proximity: String? = null, val types: MapboxTypesList? = null, val worldView: MapboxWorldView? = null) : QueryParameters

Options for the Mapbox geocoder.

See the Mapbox documentation for more information.

Constructors

Link copied to clipboard
constructor(permanent: Boolean = false, autocomplete: Boolean = true, limit: Int? = null, bbox: MapboxBoundingBox? = null, country: String? = null, language: String? = null, proximity: String? = null, types: MapboxTypesList? = null, worldView: MapboxWorldView? = null)

Create a new default instance of MapboxParameters with API specific defaults.

Properties

Link copied to clipboard
val autocomplete: Boolean = true

Specify whether to return autocomplete results (true, default) or not (false). When autocomplete is enabled, results will be included that start with the requested string, rather than responses that match it exactly. For example, a query for India might return both India and Indiana with autocomplete enabled, but only India if it’s disabled.

Link copied to clipboard
val bbox: MapboxBoundingBox? = null

Limit results to only those contained within the supplied bounding box. Bounding boxes should be supplied as four numbers separated by commas. The bounding box cannot cross the 180th meridian.

Link copied to clipboard
val country: String? = null

Limit results to one or more countries. Permitted values are ISO 3166 alpha 2 country codes separated by commas.

Link copied to clipboard
val language: String? = null

Set the language of the text supplied in responses. Also affects result scoring, with results matching the user’s query in the requested language being preferred over results that match in another language. Options are IETF language tags comprised of a mandatory ISO 639-1 language code.

Link copied to clipboard
val limit: Int? = null

The maximum number of results to return. The default is 5.

Link copied to clipboard
open override val parameters: Map<String, String>
Link copied to clipboard
val permanent: Boolean = false

Specify whether you intend to store the results of the query (true) or not (false, default).

Link copied to clipboard
val proximity: String? = null

Bias the response to favor results that are closer to this location.

Link copied to clipboard
val types: MapboxTypesList? = null

Filter results to include only a subset (one or more) of the available feature types.

Link copied to clipboard

Returns features that are defined differently by audiences that belong to various regional, cultural, or political groups. If worldview is not set, the us worldview boundaries are returned by default.

Functions

Link copied to clipboard
open fun encode(): String
Link copied to clipboard
open fun Boolean.toInt(): Int