Result

class Result @JvmOverloads constructor(val title: CharSequence, val subtitle: CharSequence?, val distanceMeters: Double?, @DrawableRes val drawable: Int, @ColorInt val drawableColor: Int? = null, val isPopulateQueryVisible: Boolean = false, val payload: Any? = null) : SearchResultAdapterItem

Item that represents any search result (e.g. com.mapbox.search.result.SearchSuggestion, com.mapbox.search.result.SearchResult, com.mapbox.search.offline.OfflineSearchResult).

Constructors

Link copied to clipboard
fun Result(title: CharSequence, subtitle: CharSequence?, distanceMeters: Double?, @DrawableRes drawable: Int, @ColorInt drawableColor: Int? = null, isPopulateQueryVisible: Boolean = false, payload: Any? = null)

Properties

Link copied to clipboard

Distance in meters from user's location to the search result.

Link copied to clipboard

Drawable resource id for the search result (e.g. address icon or category). See Maki icons.

Link copied to clipboard
val drawableColor: Int? = null

Optional tint color for drawable. Default chosen if null.

Link copied to clipboard

Whether the "Populate" view is shown (click populates search query). Default: false.

Link copied to clipboard
val payload: Any? = null

Optional payload to associate this item with the search result.

Link copied to clipboard

Subtitle text; usually the address or POI category.

Link copied to clipboard

Title text; usually the name of the search result.