RouteTrafficIncidentStyle
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. To customize marker pin and icon images, replace the default image files in your application's res folder with new versions. The custom image files must have the same file path as the default image files provided within the library. See the table below.
Magnitude of Delay | Resource | File Path |
---|---|---|
unknown | Marker pin for all categories except road works | <app_res>/drawable@/marker_traffic_bg_base.png |
Marker pin for the road works category | <app_res>/drawable@/marker_traffic_roadworks_bg_base.png | |
Marker icon for the road works category | <app_res>/drawable@/ic_map_roadworks.png | |
Marker icon for the unknown category | <app_res>/drawable@/ic_map_info.png | |
minor | Marker pin | <app_res>/drawable@/marker_traffic_minor_bg_base.png |
Marker icon for the road works category | <app_res>/drawable@/ic_map_minor_roadworks.png | |
Marker icon for the unknown category | <app_res>/drawable@/ic_map_minor_info.png | |
moderate | Marker pin | <app_res>/drawable@/marker_traffic_moderate_bg_base.png |
Marker icon for the road works category | <app_res>/drawable@/ic_map_moderate_roadworks.png | |
Marker icon for the unknown category | <app_res>/drawable@/ic_map_moderate_info.png | |
major | Marker pin | <app_res>/drawable@/marker_traffic_major_bg_base.png |
Marker icon for the road works category | <app_res>/drawable@/ic_map_major_roadworks.png | |
Marker icon for the unknown category | <app_res>/drawable@/ic_map_major_info.png | |
indefinite | Marker pin | <app_res>/drawable@/marker_traffic_road_closed_bg_base.png |
Marker icon for the road closed category | <app_res>/drawable@/ic_map_road_closed.png | |
In the table above @ is a placeholder for the density dpi suffix, meaning either: -ldpi, -mdpi, -hdpi, -xhdpi, -xxhdpi, or -xxxhdpi.
Important: This is a Public Preview API. It may be changed or removed at any time.
Parameters
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.
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.
The CapType
at the traffic line's start.
The CapType
at the traffic line's end.
The URI of the font for the label text in traffic marker.
The size (in dp units) of the label text in the traffic marker.
The width (in dp units) of the outline of the label text in the traffic marker.
The offset that will be used to position the label in the traffic marker.
The anchoring that determines how the label is positioned on the traffic marker.
The visibility of traffic incident 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.
The style properties for traffic incidents with an unknown delay magnitude.
The style properties for traffic incidents with a minor delay magnitude.
The style properties for traffic incidents with a moderate delay magnitude.
The style properties for traffic incidents with a major delay magnitude.
The style properties for traffic incidents with an indefinite delay magnitude.
Constructors
Types
Represents the criteria for a traffic marker to be visible.
The traffic incident style properties that have specific values per magnitude of delay.