RouteTrafficIncidentStyle

fun RouteTrafficIncidentStyle(lineWidths: List<WidthByZoom> = DEFAULT_LINE_WIDTHS, lineOutlineWidths: List<WidthByZoom> = DEFAULT_LINE_OUTLINE_WIDTHS, lineStartCapType: CapType = DEFAULT_LINE_START_CAP_TYPE, lineEndCapType: CapType = DEFAULT_LINE_END_CAP_TYPE, markerLabelFontUri: String = DEFAULT_MARKER_LABEL_FONT_URI, markerLabelTextSize: Double = DEFAULT_MARKER_LABEL_TEXT_SIZE, markerLabelTextOutlineWidth: Double = DEFAULT_MARKER_LABEL_TEXT_OUTLINE_WIDTH, markerLabelTextOffset: PointF = DEFAULT_MARKER_LABEL_OFFSET, markerLabelTextAnchoring: TextAnchoring = DEFAULT_MARKER_LABEL_ANCHORING, markerVisibilityByCategory: Map<TrafficIncidentCategory, RouteTrafficIncidentStyle.MarkerVisibility> = DEFAULT_MARKER_VISIBILITY_BY_CATEGORY, propertiesByMagnitudeOfDelay: Map<RouteTrafficIncidentStyle.MagnitudeOfDelayKey, RouteTrafficIncidentStyle.PropertiesByMagnitudeOfDelay> = DEFAULT_PROPERTIES_BY_MAGNITUDE_OF_DELAY)

Parameters

lineWidths

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

lineOutlineWidths

The width (in dp units) of the traffic line's outline. This parameter must be a non-empty list containing non-negative values for both the width and the zoom level where the width is used. Items in this list must not contain duplicated zoom level values.

lineStartCapType

The CapType at the traffic line's start.

lineEndCapType

The CapType at the traffic line's end.

markerLabelFontUri

The URI of the font for the label text in traffic marker.

markerLabelTextSize

The size (in dp units) of the label text in the traffic marker.

markerLabelTextOutlineWidth

The width (in dp units) of the outline of the label text in the traffic marker.

markerLabelTextOffset

The offset that will be used to position the label in the traffic marker.

markerLabelTextAnchoring

The anchoring that determines how the label is positioned on the traffic marker.

markerVisibilityByCategory

The visibility of traffic markers by category. The dictionary does not have to contain the keys of all possible categories. If a category is missing in the dictionary, markers of that category will not be displayed.

propertiesByMagnitudeOfDelay

Incident style properties by magnitude of delay. As a general rule, the dictionary must contain the keys of all possible magnitudes of delay. However, this rule is relaxed if you provide MagnitudeOfDelayKey.Any; the PropertiesByMagnitudeOfDelay associated with MagnitudeOfDelayKey.Any is used for the magnitudes of delay that were not specified with their specific keys. This means you can use the same PropertiesByMagnitudeOfDelay for all magnitudes of delay by providing only MagnitudeOfDelayKey.Any.