MatchedLocation

public struct MatchedLocation

Part of the TomTomSDKNavigationEngines/MapMatchingResult that represents a single matched position candidate.

  • Creates a new instance of matched location.

    Declaration

    Swift

    public init(
        location: GeoLocation,
        id: Int = 0,
        probability: Measurement<TTUnitRatio> = .tt.percent(0),
        isOnRoad: Bool = false,
        direction: Measurement<UnitAngle> = .tt.degrees(0)
    )

    Parameters

    location

    The GeoLocation that was matched on the map.

    id

    Identifier of this matched position candidate.

    probability

    The score of the matched position in range 0-100.

    isOnRoad

    The flag indicating whether the matched position candidate is on the road.

    direction

    The direction of the line segment in degrees clockwise from North.

  • The GeoLocation that was matched on the map.

    Declaration

    Swift

    public let location: GeoLocation
  • id

    Identifier of the matched position candidate. For the best matches the id will change when the map matcher detects a matching error and applies correction. For the alternative matches the behavior depends on the underlying matching algorithm and is generally not guaranteed.

    Declaration

    Swift

    public let id: Int
  • The score of the matched position in range 0-100.

    Declaration

    Swift

    public let probability: Measurement<TTUnitRatio>
  • The flag indicating whether the matched position candidate is on the road.

    Declaration

    Swift

    public let isOnRoad: Bool
  • The direction of the line segment on which the location is matched in degrees clockwise from North. It can be either the input heading from TomTomSDKNavigationEngines/MapMatchingResult/rawLocation, or the direction of the closest road.

    Declaration

    Swift

    public let direction: Measurement<UnitAngle>