ViewModel

public struct ViewModel

The view model used to populate the next maneuver view.

  • Creates and returns a GuidanceNextManeuverView.ViewModel.

    Declaration

    Swift

    public init(maneuverIcon: UIImage? = nil,
                distance: Measurement<UnitLength>? = nil,
                streetName: String? = nil,
                distanceFormatter: MeasurementFormatter = .currentMediumUnitFormatter,
                accessibilityDistanceFormatter: MeasurementFormatter = .currentLongUnitFormatter)

    Parameters

    maneuverIcon

    The icon of the next maneuver to be displayed.

    distance

    The travel distance of the next destination to be displayed.

    streetName

    The name of the next maneuver street to be displayed.

    distanceFormatter

    The MeasurementFormatter used to format the distance information. The default value: Uses MeasurementFormatter.currentMediumUnitFormatter.

    accessibilityDistanceFormatter

    The MeasurementFormatter used to format the distance information for accessibility VoiceOver. The default value: Uses MeasurementFormatter.currentLongUnitFormatter.