RoadShield

public struct RoadShield : Equatable

Represents a road shield.

Lifecycle

  • Creates an instance with the specified parameters.

    Throws

    An error of the type InitializationError.

    Declaration

    Swift

    public init(
        fullRoadNumber: String,
        shieldContent: String = "",
        affixes: [String] = [],
        stateCode: String = "",
        countryCode: String = "",
        reference: String = ""
    ) throws

    Parameters

    fullRoadNumber

    Full road number. Most road numbers have a ‘letter’ prefix, which is also included.

    shieldContent

    The road number as shown on the shield.

    affixes

    List of possible affixes that can be shown in addition to the shieldContent.

    stateCode

    The state code of the state the shield is in (second part of an ISO 3166-2 identifier).

    countryCode

    The country code (ISO 3166-1 alpha-3) of the country the shield is in.

    reference

    Transparent identifier of the shield for use with TomTom’s RoadShield API (see “Routing with Extended Guidance”). May be empty if the underlying data source does not support the mapping.

Public

  • The full road number. Most road numbers have a ‘letter’ prefix, which is also returned. For example, a call for the German motorway returns “A40” rather than “40”.

    Declaration

    Swift

    public let fullRoadNumber: String
  • The road number as shown on the shield. For example, a call for the German motorway returns “40” rather than “A40”.

    Declaration

    Swift

    public let shieldContent: String
  • Additional shield text, such as “N”, “Bus” (for “Business”), “Bus Loop” (for “Business Loop”).

    Declaration

    Swift

    public let affixes: [String]
  • The state code of the state the shield is in (second part of an ISO 3166-2 identifier).

    Declaration

    Swift

    public let stateCode: String
  • The country code (ISO 3166-1 alpha-3) of the country the shield is in.

    Declaration

    Swift

    public let countryCode: String
  • Transparent identifier of the shield for use with TomTom’s RoadShield API (see “Routing with Extended Guidance”). May be empty if the underlying data source does not support the mapping.

    Declaration

    Swift

    public let reference: String

RoadShield.InitializationError