RouteTrafficIncidentStyle
public struct RouteTrafficIncidentStyleStyle 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 such as fonts and icons are bundled into the framework.
You can provide custom icons in propertiesByMagnitudeOfDelay
Important
This is a Public Preview API. It may be changed or removed at any time.- 
                  init(lineWidths:lineOutlineWidths: lineStartCapType: lineEndCapType: lineJointType: markerLabelFontURI: markerLabelTextSize: markerLabelTextOutlineWidth: markerLabelTextOffset: markerLabelTextAnchoring: markerVisibilityByCategory: propertiesByMagnitudeOfDelay: areMarkersVisible: ) Initializes RouteTrafficIncidentStylewith the given values.Throws If anyis missing and not all other magnitudes of delay are provided, the initializer will throwRouteStyleError.DeclarationSwift public init( lineWidths: [Double: Double] = Defaults.lineWidths, lineOutlineWidths: [Double: Double] = Defaults.lineOutlineWidths, lineStartCapType: LineCapType = Defaults.lineStartCapType, lineEndCapType: LineCapType = Defaults.lineEndCapType, lineJointType: LineJoinType = Defaults.lineJointType, markerLabelFontURI: String = Defaults.Asset.markerLabelFontURI, markerLabelTextSize: Double = Defaults.markerLabelTextSize, markerLabelTextOutlineWidth: Double = Defaults.markerLabelTextOutlineWidth, markerLabelTextOffset: MarkerLabelOptions.TextOffset = Defaults.markerLabelTextOffset, markerLabelTextAnchoring: TextAnchoring = Defaults.markerLabelTextAnchoring, markerVisibilityByCategory: [TrafficIncidentCategory: MarkerVisibility] = Defaults .markerVisibilityByCategory, propertiesByMagnitudeOfDelay: [MagnitudeOfDelayKey: MagnitudeOfDelayProperties] = Defaults.propertiesByMagnitudeOfDelay, areMarkersVisible: Bool = Defaults.areMarkersVisible ) throwsParameterslineWidthsThe line width of the on-route traffic lines. By default, lineWidthsis used. This parameter must be a non-empty dictionary containing non-negative values for both the width and the zoom level where that width is to be used.lineOutlineWidthsThe outline width of the on-route traffic lines. By default, lineOutlineWidthsis used. This parameter must be a non-empty dictionary containing non-negative values for both the width and the zoom level where that width is to be used.lineStartCapTypeThe on-route traffic line start cap. By default, lineStartCapTypeis used.lineEndCapTypeThe on-route traffic line end cap. By default, lineEndCapTypeis used.lineJointTypeThe on-route traffic line joint type. By default, lineJointTypeis used.markerLabelFontURIThe URL of the font for the label text in the traffic marker. By default, markerLabelFontURIis used.markerLabelTextSizeThe size of the label text in the traffic marker. By default, markerLabelTextSizeis used.markerLabelTextOutlineWidthThe width of the outline of the label text in the traffic marker. By default, markerLabelTextOutlineWidthis used.markerLabelTextOffsetThe offset that will be used to position the label in the traffic marker. By default, markerLabelTextOffsetis used.markerLabelTextAnchoringThe anchoring that determines how the label is positioned on the traffic marker. By default, markerLabelTextAnchoringis used.markerVisibilityByCategoryThe visibility of traffic incident markers by category. By default, markerVisibilityByCategoryis used. This dictionary does not have to contain keys of all possible categories. If a category is missing in the dictionary, markers of that category will not be displayed.ImportantControl of traffic incident marker visibility is not implemented yet. propertiesByMagnitudeOfDelayStyle properties for traffic incidents by magnitude of delay. By default, propertiesByMagnitudeOfDelayis used. This dictionary may not contain keys for all possible magnitudes of delay. If a magnitude of delay is missing in the dictionary, the style foranyis used.areMarkersVisibleWhether traffic markers are visible. By default, areMarkersVisibleis used.
- 
                  
                  Initializes RouteTrafficIncidentStylewith values fromDefaults.DeclarationSwift public init()
- 
                  
                  The line widths of on-route traffic lines. This parameter must be a non-empty dictionary containing non-negative values for both the width and the zoom level where that width is used. DeclarationSwift public let lineWidths: [Double : Double]
- 
                  
                  The outline line width of on-route traffic lines. This parameter must be a non-empty dictionary containing non-negative values for both the width and the zoom level where that width is used. DeclarationSwift public let lineOutlineWidths: [Double : Double]
- 
                  
                  The on-route traffic line start cap. DeclarationSwift public let lineStartCapType: LineCapType
- 
                  
                  The on-route traffic line end cap. DeclarationSwift public let lineEndCapType: LineCapType
- 
                  
                  The on-route traffic line joint type. DeclarationSwift public let lineJointType: LineJoinType
- 
                  
                  The URI of the font for the label text in the traffic marker. DeclarationSwift public let markerLabelFontURI: String
- 
                  
                  The size of the label text in the traffic marker. DeclarationSwift public let markerLabelTextSize: Double
- 
                  
                  The width of the outline of the label text in the traffic marker. DeclarationSwift public let markerLabelTextOutlineWidth: Double
- 
                  
                  The offset that will be used to position the label in the traffic marker. DeclarationSwift public let markerLabelTextOffset: MarkerLabelOptions.TextOffset
- 
                  
                  The anchoring that determines how the label is positioned on the traffic marker. DeclarationSwift public let markerLabelTextAnchoring: TextAnchoring
- 
                  
                  Traffic incident marker visibility by category. That dictionary does not have to contain keys of all possible categories. If a category is missing in the dictionary, markers of that category will not be displayed. DeclarationSwift public let markerVisibilityByCategory: [TrafficIncidentCategory : MarkerVisibility]
- 
                  
                  Style properties for traffic incidents by magnitude of delay. This dictionary may not contain keys for all possible magnitudes of delay. If a magnitude of delay is missing in the dictionary, style for MagnitudeOfDelayKey.anyis used.DeclarationSwift public let propertiesByMagnitudeOfDelay: [MagnitudeOfDelayKey : MagnitudeOfDelayProperties]
- 
                  
                  Whether traffic markers are visible. Default is true.DeclarationSwift public let areMarkersVisible: Bool
- 
                  
                  Key for the magnitude of delay of traffic incidents used in RouteTrafficIncidentStyle.See moreImportant This is a Public Preview API. It may be changed or removed at any time.DeclarationSwift public enum MagnitudeOfDelayKey
- 
                  
                  Key for categories of on-route traffic incidents used in RouteTrafficIncidentStyleSee moreImportant This is a Public Preview API. It may be changed or removed at any time.DeclarationSwift public enum TrafficIncidentCategoryKey
- 
                  
                  Represents a line pattern display configuration for a specific zoom range. See moreImportant This is a Public Preview API. It may be changed or removed at any time.DeclarationSwift public struct LinePatternDisplay
- 
                  
                  The traffic incident style properties that have specific values per magnitude of delay. Traffic incidents may have different magnitudes of delay associated with them: unknown, minor, moderate, major, or indefinite. PropertiesByMagnitudeOfDelaystores traffic incident style properties whose specific values depend on the magnitude of delay.See moreImportant This is a Public Preview API. It may be changed or removed at any time.DeclarationSwift public struct MagnitudeOfDelayProperties
- 
                  
                  Describes marker visibility setup by zoom level and camera tilt. See moreImportant This is a Public Preview API. It may be changed or removed at any time.DeclarationSwift public struct MarkerVisibility
 
         TomTom SDK for iOS (0.53.1)
 
          TomTom SDK for iOS (0.53.1)
         RouteTrafficIncidentStyle
          RouteTrafficIncidentStyle