RouteStyle

data class RouteStyle(@ColorInt val activeLineColor: Int = DEFAULT_ACTIVE_LINE_COLOR, @ColorInt val alternativeLineColor: Int = DEFAULT_ALTERNATIVE_LINE_COLOR, val alternativeLineColorOverrule: Map<Int, Int> = emptyMap(), val activeLineWidths: List<WidthByZoom> = DEFAULT_ACTIVE_LINE_WIDTHS, val alternativeLineWidths: List<WidthByZoom> = DEFAULT_ALTERNATIVE_LINE_WIDTHS, val activeOutlineWidths: List<WidthByZoom> = DEFAULT_ACTIVE_OUTLINE_WIDTHS, val alternativeOutlineWidths: List<WidthByZoom> = DEFAULT_ALTERNATIVE_OUTLINE_WIDTHS, val waypointMarkerPin: Image = ImageFactory.fromResource(DEFAULT_WAYPOINT_MARKER_PIN), val waypointMarkerIcon: Image = ImageFactory.fromResource(DEFAULT_WAYPOINT_MARKER_ICON), val departureMarkerVisible: Boolean = DEFAULT_DEPARTURE_MARKER_VISIBLE, val destinationMarkerVisible: Boolean = DEFAULT_DESTINATION_MARKER_VISIBLE, val departureMarkerPin: Image = ImageFactory.fromResource(DEFAULT_DEPARTURE_MARKER_PIN), val destinationMarkerPin: Image = ImageFactory.fromResource(DEFAULT_DESTINATION_MARKER_PIN), val waypointsVisible: Boolean = DEFAULT_WAYPOINTS_VISIBILITY)

Represents a style configuration for the routes.

The properties related to the active route (i.e., the properties prefixed with "active") also apply to the selected route during the route planning phase.

During instance construction, certain input values are checked against the range of values expected for that field (e.g., width values must be non-negative).

Default assets and resources are bundled into the library. You do not need to supply any asset/resource files unless you want to customize something (for example, the icon of waypoint markers).

Important: This is a Public Preview API. It may be changed or removed at any time.

Constructors

Link copied to clipboard
constructor(@ColorInt activeLineColor: Int = DEFAULT_ACTIVE_LINE_COLOR, @ColorInt alternativeLineColor: Int = DEFAULT_ALTERNATIVE_LINE_COLOR, alternativeLineColorOverrule: Map<Int, Int> = emptyMap(), activeLineWidths: List<WidthByZoom> = DEFAULT_ACTIVE_LINE_WIDTHS, alternativeLineWidths: List<WidthByZoom> = DEFAULT_ALTERNATIVE_LINE_WIDTHS, activeOutlineWidths: List<WidthByZoom> = DEFAULT_ACTIVE_OUTLINE_WIDTHS, alternativeOutlineWidths: List<WidthByZoom> = DEFAULT_ALTERNATIVE_OUTLINE_WIDTHS, waypointMarkerPin: Image = ImageFactory.fromResource(DEFAULT_WAYPOINT_MARKER_PIN), waypointMarkerIcon: Image = ImageFactory.fromResource(DEFAULT_WAYPOINT_MARKER_ICON), departureMarkerVisible: Boolean = DEFAULT_DEPARTURE_MARKER_VISIBLE, destinationMarkerVisible: Boolean = DEFAULT_DESTINATION_MARKER_VISIBLE, departureMarkerPin: Image = ImageFactory.fromResource(DEFAULT_DEPARTURE_MARKER_PIN), destinationMarkerPin: Image = ImageFactory.fromResource(DEFAULT_DESTINATION_MARKER_PIN), waypointsVisible: Boolean = DEFAULT_WAYPOINTS_VISIBILITY)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The color of the active route. You can control the opacity of the route line by using the alpha component of the ARGB color integer.

Link copied to clipboard

The line width (in dp units) of the active route. This parameter must be a non-empty list containing non-negative values for both the width and the zoom level that width is used at. Items in this list must not contain duplicated zoom level values.

Link copied to clipboard

The outline width (in dp units) of the active route. This parameter must be a non-empty list containing non-negative values for both the width and the zoom level that width is used at. Items in this list must not contain duplicated zoom level values.

Link copied to clipboard

The color of the alternative routes. This color may be overruled individually for each alternative route using alternativeLineColorOverrule. You can control the opacity of the route line by using the alpha component of the ARGB color integer.

Link copied to clipboard

The color to individually overrule the color specified in alternativeLineColor. You can control the opacity of the route line by using the alpha component of the ARGB color integer.

Link copied to clipboard

The outline width (in dp units) of the alternative routes. This parameter must be a non-empty list containing non-negative values for both the width and the zoom level that width is used at. Items in this list must not contain duplicated zoom level values.

Link copied to clipboard

The outline width (in dp units) of the alternative routes. This parameter must be a non-empty list containing non-negative values for both the width and the zoom level that width is used at. Items in this list must not contain duplicated zoom level values.

Link copied to clipboard

The pin image for the departure marker.

Link copied to clipboard

Determines the visibility of the departure marker.

Link copied to clipboard

The pin image for the destination marker.

Link copied to clipboard

Determines the visibility of the destination marker.

Link copied to clipboard

The icon image for waypoint markers.

Link copied to clipboard

The pin image for waypoint markers.

Link copied to clipboard