EHorizonObserver

interface EHorizonObserver

Electronic horizon listener. Callbacks are fired in the order specified. onPositionUpdated might be called multiple times after the other callbacks until a new change to the horizon occurs.

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.

Functions

Link copied to clipboard
abstract fun onPositionUpdated(position: EHorizonPosition, distances: List<RoadObjectDistanceInfo>)

This callback might be called multiple times when the position changes.

Link copied to clipboard
abstract fun onRoadObjectAdded(roadObjectId: String)

This callback is fired whenever road object is added

Link copied to clipboard
abstract fun onRoadObjectEnter(objectEnterExitInfo: RoadObjectEnterExitInfo)

Called when entry to line-like (i.e. which has length != null) road object was detected

Link copied to clipboard
abstract fun onRoadObjectExit(objectEnterExitInfo: RoadObjectEnterExitInfo)

Called when exit from line-like (i.e. which has length != null) road object was detected

Link copied to clipboard
abstract fun onRoadObjectPassed(objectPassInfo: RoadObjectPassInfo)

Called when the object is passed.

Link copied to clipboard
abstract fun onRoadObjectRemoved(roadObjectId: String)

This callback is fired whenever road object is removed

Link copied to clipboard
abstract fun onRoadObjectUpdated(roadObjectId: String)

This callback is fired whenever road object is updated