RouteTrafficIncidentStyle

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

Style configuration for on-route traffic incidents.

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 (e.g., fonts and icons). You do not need to supply any asset/resource files unless you want to customize something.

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

Constructors

Link copied to clipboard
constructor(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.MagnitudeOfDelayProperties> = DEFAULT_PROPERTIES_BY_MAGNITUDE_OF_DELAY, areMarkersVisible: Boolean = DEFAULT_MARKERS_VISIBILITY)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Represents the criteria for traffic lines to be displayed with a pattern.

Link copied to clipboard

Keys used for styling traffic incidents by magnitude of delay.

Link copied to clipboard
class MagnitudeOfDelayProperties(@ColorInt val lineColor: Int, @ColorInt val lineOutlineColor: Int, @ColorInt val markerLabelTextColor: Int, @ColorInt val markerLabelTextOutlineColor: Int, val markerPinImageByCategory: Map<RouteTrafficIncidentStyle.TrafficIncidentCategoryKey, Image>, val markerIconImageByCategory: Map<RouteTrafficIncidentStyle.TrafficIncidentCategoryKey, Image>, val linePatternImage: Image? = null, val linePatternDisplay: RouteTrafficIncidentStyle.LinePatternDisplay = LinePatternDisplay(ZOOM_FULL_RANGE))

The traffic incident style properties that have specific values per magnitude of delay.

Link copied to clipboard

Represents the criteria for a traffic marker to be visible.

Link copied to clipboard

Keys for styling traffic incidents by category.

Properties

Link copied to clipboard

Whether traffic markers are visible. Default is true.

Link copied to clipboard

The CapType at the traffic line's end.

Link copied to clipboard

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.

Link copied to clipboard

The CapType at the traffic line's start.

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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.

Link copied to clipboard

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 MagnitudeOfDelayProperties 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 MagnitudeOfDelayProperties for all magnitudes of delay by providing only MagnitudeOfDelayKey.Any.

Functions

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