RouteLineColorResources

class RouteLineColorResources

Contains colors an other values used to determine the appearance of the route line.

Parameters

lowCongestionRange

the range for low congestion traffic.

moderateCongestionRange

the range for low congestion traffic.

heavyCongestionRange

the range for low congestion traffic.

severeCongestionRange

the range for low congestion traffic.

routeDefaultColor

the default color of the route line

routeLowCongestionColor

the color used for representing low traffic congestion

routeModerateCongestionColor

the color used for representing moderate traffic congestion

routeHeavyCongestionColor

the color used for representing heavy traffic congestion

routeSevereCongestionColor

the color used for representing severe traffic congestion

routeUnknownCongestionColor

the color used for representing unknown traffic congestion

routeClosureColor

the color used for the route closure line

restrictedRoadColor

the color for the restricted road indicator(s)

alternativeRouteDefaultColor

the default color used for alternative route lines

alternativeRouteLowCongestionColor

the color used for representing low traffic congestion on alternative routes

alternativeRouteModerateCongestionColor

the color used for representing moderate traffic congestion on alternative routes

alternativeRouteHeavyCongestionColor

the color used for representing heavy traffic congestion on alternative routes

alternativeRouteSevereCongestionColor

the color used for representing severe traffic congestion on alternative routes

alternativeRouteUnknownCongestionColor

the color used for representing unknown traffic congestion on alternative routes

alternativeRouteRestrictedRoadColor

the color for the restricted road indicator(s) for alternative routes.

alternativeRouteClosureColor

the color used for the alternative route closure line(s)

routeLineTraveledColor

the color of the section of route line behind the puck representing the section of the route traveled

routeLineTraveledCasingColor

the color of the casing section of route line behind the puck representing the section of the route traveled. By default the casing line is beneath the route line and gives the appearance of a border

routeCasingColor

the color used for the route casing line which is positioned below the route line giving the line the appearance of a boarder

alternativeRouteCasingColor

the color used for the alternative route casing line(s) which is positioned below the route line giving the line the appearance of a boarder

inActiveRouteLegsColor

the color used for route legs that aren't currently being navigated.

The congestion range is to be used if when making a route request you use DirectionCriteria.ANNOTATION_CONGESTION_NUMERIC annotation. The congestion values obtained with this annotation in the route response would be in the range 0..100, 0 being the minimum and 100 being the maximum congestion values. Unknown congestion values will be represented as nullRouteLineColorResources defines 4 ranges:

  • lowCongestionRange: default value spans from 0..39

  • moderateCongestionRange: default value spans from 40..59

  • heavyCongestionRange: default value spans from 60..79

  • severeCongestionRange: default value spans from 80..100 You can specify your own ranges for all of the above using the RouteLineColorResources.Builder. If the ranges overlap, the RouteLineColorResources.Builder.build would fail and throw IllegalStateException. You also need to make sure that all values from 0..100 are covered using these four ranges, else any missing number would be treated as unknown congestion. For ex, if you define the range as follows:

  • lowCongestionRange: 0..39

  • moderateCongestionRange: 50..59

  • heavyCongestionRange: 60..79

  • severeCongestionRange: 80..100 If the route response contains a congestion number 45, it would be treated as unknown because it doesn't exist in any of the ranges specified.

Types

Builder
Link copied to clipboard
class Builder
A builder for instantiating the RouteLineResources class

Functions

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Indicates whether some other object is "equal to" this one.
hashCode
Link copied to clipboard
open override fun hashCode(): Int
Returns a hash code value for the object.
toBuilder
Link copied to clipboard
fun toBuilder(): RouteLineColorResources.Builder
toString
Link copied to clipboard
open override fun toString(): String
Returns a string representation of the object.

Properties

alternativeRouteCasingColor
Link copied to clipboard
val alternativeRouteCasingColor: Int
the color used for the alternative route casing line(s) which is positioned below the route line giving the line the appearance of a boarder
alternativeRouteClosureColor
Link copied to clipboard
val alternativeRouteClosureColor: Int
the color used for the alternative route closure line(s)
alternativeRouteDefaultColor
Link copied to clipboard
val alternativeRouteDefaultColor: Int
the default color used for alternative route lines
alternativeRouteHeavyCongestionColor
Link copied to clipboard
val alternativeRouteHeavyCongestionColor: Int
the color used for representing heavy traffic congestion on alternative routes
alternativeRouteLowCongestionColor
Link copied to clipboard
val alternativeRouteLowCongestionColor: Int
the color used for representing low traffic congestion on alternative routes
alternativeRouteModerateCongestionColor
Link copied to clipboard
val alternativeRouteModerateCongestionColor: Int
the color used for representing moderate traffic congestion on alternative routes
alternativeRouteRestrictedRoadColor
Link copied to clipboard
val alternativeRouteRestrictedRoadColor: Int
the color for the restricted road indicator(s) for alternative routes.
alternativeRouteSevereCongestionColor
Link copied to clipboard
val alternativeRouteSevereCongestionColor: Int
the color used for representing severe traffic congestion on alternative routes
alternativeRouteUnknownCongestionColor
Link copied to clipboard
val alternativeRouteUnknownCongestionColor: Int
the color used for representing unknown traffic congestion on alternative routes
heavyCongestionRange
Link copied to clipboard
val heavyCongestionRange: IntRange
the range for low congestion traffic.
inActiveRouteLegsColor
Link copied to clipboard
val inActiveRouteLegsColor: Int
the color used for route legs that aren't currently being navigated.
lowCongestionRange
Link copied to clipboard
val lowCongestionRange: IntRange
the range for low congestion traffic.
moderateCongestionRange
Link copied to clipboard
val moderateCongestionRange: IntRange
the range for low congestion traffic.
restrictedRoadColor
Link copied to clipboard
val restrictedRoadColor: Int
the color for the restricted road indicator(s)
routeCasingColor
Link copied to clipboard
val routeCasingColor: Int
the color used for the route casing line which is positioned below the route line giving the line the appearance of a boarder
routeClosureColor
Link copied to clipboard
val routeClosureColor: Int
the color used for the route closure line
routeDefaultColor
Link copied to clipboard
val routeDefaultColor: Int
the default color of the route line
routeHeavyCongestionColor
Link copied to clipboard
val routeHeavyCongestionColor: Int
the color used for representing heavy traffic congestion
routeLineTraveledCasingColor
Link copied to clipboard
val routeLineTraveledCasingColor: Int
the color of the casing section of route line behind the puck representing the section of the route traveled.
routeLineTraveledColor
Link copied to clipboard
val routeLineTraveledColor: Int
the color of the section of route line behind the puck representing the section of the route traveled
routeLowCongestionColor
Link copied to clipboard
val routeLowCongestionColor: Int
the color used for representing low traffic congestion
routeModerateCongestionColor
Link copied to clipboard
val routeModerateCongestionColor: Int
the color used for representing moderate traffic congestion
routeSevereCongestionColor
Link copied to clipboard
val routeSevereCongestionColor: Int
the color used for representing severe traffic congestion
routeUnknownCongestionColor
Link copied to clipboard
val routeUnknownCongestionColor: Int
the color used for representing unknown traffic congestion
severeCongestionRange
Link copied to clipboard
val severeCongestionRange: IntRange
the range for low congestion traffic.