PropertiesMutcd

class PropertiesMutcd(shouldFallbackWithText: Boolean, shouldFallbackWithDrawable: Boolean, @DrawableRes() exitBackground: Int, @DrawableRes() fallbackDrawable: Int, @DrawableRes() exitLeftDrawable: Int, @DrawableRes() exitRightDrawable: Int) : MapboxExitProperties

An implementation of MapboxExitProperties that allows you to define various properties you wish to use to render for ExitComponentNode of a given PrimaryManeuver, SecondaryManeuver or SubManeuver. The properties specified in this implementation will be used in countries that follow MUTCD convention. The priority of fallback is in the order:

  • shouldFallbackWithDrawable

  • shouldFallbackWithText If both are set to false, no fallback will be applied and only the exit text associated with the Maneuver will be rendered.

Parameters

shouldFallbackWithDrawable

set to true if you want to use fallbackDrawable in case if the Maneuver contains an ExitComponentNode with a ManeuverModifier value other than left or right.

shouldFallbackWithText

set to true if you don't want to use a fallbackDrawable but prepend text "Exit" to the exit number in the Maneuver

exitBackground

background to be set to the text view

fallbackDrawable

drawable to be used in case ManeuverModifier has a different value other than left or right

exitLeftDrawable

drawable to be used when ManeuverModifier is left

exitRightDrawable

drawable to be used when ManeuverModifier is right

Constructors

PropertiesMutcd
Link copied to clipboard
fun PropertiesMutcd(shouldFallbackWithText: Boolean = false, shouldFallbackWithDrawable: Boolean = true, @DrawableRes() exitBackground: Int = R.drawable.mapbox_exit_board_background, @DrawableRes() fallbackDrawable: Int = R.drawable.mapbox_ic_exit_arrow_right_mutcd, @DrawableRes() exitLeftDrawable: Int = R.drawable.mapbox_ic_exit_arrow_left_mutcd, @DrawableRes() exitRightDrawable: Int = R.drawable.mapbox_ic_exit_arrow_right_mutcd)
set to true if you want to use fallbackDrawable in case if the Maneuver contains an ExitComponentNode with a ManeuverModifier value other than left or right.

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
toString
Link copied to clipboard
open fun toString(): String

Properties

exitBackground
Link copied to clipboard
val exitBackground: Int
background to be set to the text view
exitLeftDrawable
Link copied to clipboard
val exitLeftDrawable: Int
drawable to be used when ManeuverModifier is left
exitRightDrawable
Link copied to clipboard
val exitRightDrawable: Int
drawable to be used when ManeuverModifier is right
fallbackDrawable
Link copied to clipboard
val fallbackDrawable: Int
drawable to be used in case ManeuverModifier has a different value other than left or right
shouldFallbackWithDrawable
Link copied to clipboard
val shouldFallbackWithDrawable: Boolean
set to true if you want to use fallbackDrawable in case if the Maneuver contains an ExitComponentNode with a ManeuverModifier value other than left or right.
shouldFallbackWithText
Link copied to clipboard
val shouldFallbackWithText: Boolean
set to true if you don't want to use a fallbackDrawable but prepend text "Exit" to the exit number in the Maneuver