SafetyLocationStyle

public struct SafetyLocationStyle

Defines the appearance and behavior of the safety location visualization on the route.

Important

Currently supported safety location types are:
  • SafetyLocation/SafetyLocationType/speedEnforcement
  • SafetyLocation/SafetyLocationType/averageSpeed
  • SafetyLocation/SafetyLocationType/mobileRiskZone
  • SafetyLocation/SafetyLocationType/trafficLight
  • SafetyLocation/SafetyLocationType/mobile
  • SafetyLocation/SafetyLocationType/fixedDangerZone
  • SafetyLocation/SafetyLocationType/blackSpot

Important

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

Lifecycle

  • Represents the style used to display safety locations.

    Declaration

    Swift

    public init(
        speedCameraLineColor: UIColor = Defaults.speedCameraLineColor,
        speedCameraOutlineColor: UIColor = Defaults.speedCameraOutlineColor,
        dangerZoneLineColor: UIColor = Defaults.dangerZoneLineColor,
        dangerZoneOutlineColor: UIColor = Defaults.dangerZoneOutlineColor,
        lineWidth: [WidthScene] = Defaults.lineWidth,
        outlineWidth: [OutlineWidthScene] = Defaults.outlineWidth,
        markerStyleByCategory: [SafetyLocation.SafetyLocationType: SafetyLocationMarkerStyle] = Defaults
            .markerStyleByCategory
    )

    Parameters

    speedCameraLineColor

    The color of the line for speed cameras representing zones.

    speedCameraOutlineColor

    The outline color of the line for speed cameras representing zones.

    dangerZoneLineColor

    The color of the line for danger zones.

    dangerZoneOutlineColor

    The outline color of the line for danger zones.

    lineWidth

    The width (in point units) of the line for safety location representing zones. 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.

    outlineWidth

    The width (in point units) of the line’s outline for safety location representing zones. 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.

    markerStyleByCategory

    The safety location’s marker style by category. If the marker style is missing for any of the supported safety locations, a default marker style will be used.

Public

  • The color of the line for speed cameras representing zones.

    Declaration

    Swift

    public let speedCameraLineColor: UIColor
  • The outline color of the line for speed cameras representing zones.

    Declaration

    Swift

    public let speedCameraOutlineColor: UIColor
  • The color of the line for danger zones.

    Declaration

    Swift

    public let dangerZoneLineColor: UIColor
  • The outline color of the line for danger zones.

    Declaration

    Swift

    public let dangerZoneOutlineColor: UIColor
  • The width (in point units) of the line for safety location representing zones.

    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.

    Declaration

    Swift

    public let lineWidth: [WidthScene]
  • The width (in point units) of the line’s outline for safety location representing zones.

    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.

    Declaration

    Swift

    public let outlineWidth: [OutlineWidthScene]
  • The safety location’s marker style by category. If the marker style is missing for any of the supported safety locations, a default marker style will be used.

    Declaration

    Swift

    public let markerStyleByCategory: [SafetyLocation.SafetyLocationType : SafetyLocationMarkerStyle]
  • Represents the style used to display safety locations markers.

    Important

    This stylization API is intended to be used for only the turn-by-turn navigation.

    Important

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

    Declaration

    Swift

    public struct TextStyle

SafetyLocationStyle.Defaults

  • Provides default values for SafetyLocationStyle properties.

    Important

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

    Declaration

    Swift

    public enum Defaults

SafetyLocationStyle.SafetyLocationMarkerStyle

  • A container for the start, end, and background images of safety location markers.

    Important

    This stylization API is intended to be used for only the turn-by-turn navigation.

    Important

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

    Declaration

    Swift

    public struct SafetyLocationMarkerStyle