EHorizon

class EHorizon

An Electronic Horizon is a probable path (or paths) of a vehicle within the road graph which is used to surface metadata about the underlying edges of the graph for a certain distance in front of the vehicle thus extending the user's perspective beyond the “visible” horizon.

Mapbox Electronic Horizon correlates the vehicle’s location to the road graph and broadcasts updates to the Electronic Horizon as the vehicle’s position and trajectory change.

In Active Guidance state, the user-selected route and its metadata are used as the path for the Electronic Horizon. In a Free Drive state there is no active route selected, Mapbox Electronic Horizon will determine the most probable path from the vehicle’s current location. For both states Active Guidance and Free Drive, the Electronic Horizon and its metadata are exposed via the same interface as described below.

We represent the road network ahead of us as a tree of edges. Each intersection has outbound edges and each edge has probability of transition to another edge as well as metadata which can be used to implement sophisticated features on top of it.

The EHorizon is a simple tree structure that can be navigated easily by traversing the Edges and their outgoing connections. This can be done by simply looping over the Edges or using a Visitor. For common cases, a number of utilities have been added which are described below.

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.

Parameters

Functions

current
Link copied to clipboard
fun current(position: EHorizonPosition): EHorizonEdge
Get the current edge given the position
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Regenerate whenever a change is made
hashCode
Link copied to clipboard
open override fun hashCode(): Int
Regenerate whenever a change is made
mpp
Link copied to clipboard
fun mpp(): List<List<EHorizonEdge>>
Get the MPP starting at the first Edge in the EHorizon
fun mpp(position: EHorizonPosition): List<List<EHorizonEdge>>
Get the MPP starting at the current EHorizonPosition
toString
Link copied to clipboard
open override fun toString(): String
Returns a string representation of the object.

Properties

start
Link copied to clipboard
val start: EHorizonEdge