EdgeLocation

public struct EdgeLocation

Represents location of road object on road graph.

A point object is represented by a single edge whose location has the same fractionFromStart and fractionToEnd.

Note

The Mapbox Electronic Horizon feature of the Mapbox Navigation SDK is in public beta and is subject to changes, including its pricing. Use of the feature is subject to the beta product restrictions in the Mapbox Terms of Service. Mapbox reserves the right to eliminate any free tier or free evaluation offers at any time and require customers to place an order to purchase the Mapbox Electronic Horizon feature, regardless of the level of use of the feature.
  • Offset from the start of edge (0 - 1) pointing to the beginning of road object on this edge will be 0 for all edges in the line-like road object except the very first one in the case of point-like object fractionFromStart == fractionToEnd

    Declaration

    Swift

    public let fractionFromStart: Double
  • Offset from the start of edge (0 - 1) pointing to the end of road object on this edge will be 1 for all edges in the line-like road object except the very first one in the case of point-like object fractionFromStart == fractionToEnd

    Declaration

    Swift

    public let fractionToEnd: Double
  • Initializes a new EdgeLocation object with a fraction from the start and a fraction from the end of the road object.

    Declaration

    Swift

    public init(fractionFromStart: Double, fractionToEnd: Double)