RouteDescriptionItem

@IBDesignable
open class RouteDescriptionItem : UIView

A visual item to display a NMARoute object based on its visible sections. Note that the traffic delay depends on the NMAMapView‘s isTrafficVisible flag and NMADynamicPenalty’s trafficPenaltyMode setting: when the HERE map shows traffic data, the traffic delay data appears. However, when the HERE map does not show traffic data and the trafficPenaltyMode is not .optimal, then there is no traffic data available. In this case, trying to show traffic delay results in No delays displayed automatically. Hence, it is advisable to calculate the routes with .optimal penalty mode. Plus, traffic delay information is not available when the transport mode is .bike or .pedestrian.

  • Describes atomic sections of the item for visibility.

    See more

    Declaration

    Swift

    public struct Section : OptionSet
  • Whether traffic should be considered when calculating the duration and arrival time.

    Declaration

    Swift

    @IBInspectable
    public var trafficEnabled: Bool { get set }
  • The proxy property to make the visibleSections property accessible from the Interface Builder. It accepts a string like icon|duration|length to set the visibleSections property, so the users can avoid arithmetic while setting this property. Note that unknown substrings are simply ignored.

    Note

    It shadows the visibleSections property.

    Declaration

    Swift

    @IBInspectable
    public var visibleSectionsProxy: String { get set }
  • The color of the transport mode icon.

    Declaration

    Swift

    public var transportModeImageColor: UIColor? { get set }
  • The bar view progress color.

    Declaration

    Swift

    public var barViewProgressColor: UIColor? { get set }
  • The bar view track color.

    Declaration

    Swift

    public var barViewTrackColor: UIColor? { get set }
  • The primary label (a.k.a. duration label) color.

    Declaration

    Swift

    public var primaryLabelColor: UIColor? { get set }
  • The secondary labels (delay, length, and time labels) colors.

    Declaration

    Swift

    public var secondaryLabelsColor: UIColor? { get set }
  • The warning color.

    Declaration

    Swift

    public var warningColor: UIColor? { get set }
  • The item leading inset, which sets the spacing between the leading side and the visible subviews.

    Declaration

    Swift

    public var leadingInset: CGFloat { get set }
  • The item trailing inset, which sets the spacing between the visible subviews and the trailing side.

    Declaration

    Swift

    public var trailingInset: CGFloat { get set }
  • Sets the visibility of available sections.

    Note

    Initially all the sections are visible.

    Declaration

    Swift

    public var visibleSections: RouteDescriptionItem.Section { get set }
  • The NMARoute object associated with the item. The item visualizes its data.

    Declaration

    Swift

    public var route: NMARoute? { get set }
  • Determines the scaling of the bar. The normalized values should be between 0.0 and 1.0.

    Declaration

    Swift

    public var scale: Double { get set }
  • Queries the visibility of the given section.

    Declaration

    Swift

    public func isSectionVisible(_ section: Section) -> Bool

    Parameters

    section

    The section whose visibility is to be queried.

    Return Value

    true if the section is visible and false otherwise.

  • Sets the given section visible or not.

    Declaration

    Swift

    public func setSectionVisible(_ section: Section, _ visible: Bool)

    Parameters

    section

    The section whose visibility to be set.

    visible

    The new visibility of the section.