sdk / com.mapbox.search / ReverseGeoOptions

ReverseGeoOptions

data class ReverseGeoOptions : Parcelable

Search options for reverse geocoding.

Types

Builder

Builder for comfortable creation of ReverseGeoOptions instance.

class Builder

Constructors

<init>

Search options for reverse geocoding.

ReverseGeoOptions(center: Point, countries: List<Country>? = null, languages: List<Language>? = defaultSearchOptionsLanguage(), limit: Int? = null, reverseMode: ReverseMode? = null, types: List<QueryType>? = null)

Properties

center

Coordinates to resolve.

val center: Point

countries

Limit results to one or more countries.

val countries: List<Country>?

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 default is 1 and the maximum supported is 5. The default behavior in reverse geocoding is to return at most one feature at each of the multiple levels of the administrative hierarchy (for example, one address, one region, one country). Increasing the limit allows returning multiple features of the same type, but only for one type (for example, multiple address results). Consequently, setting limit to a higher-than-default value requires specifying exactly one types parameter.

val limit: Int?

reverseMode

Decides how results are sorted in a reverse geocoding query.

val reverseMode: ReverseMode?

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>?