RoadObjectsStore

class RoadObjectsStore

MapboxNavigation.roadObjectsStore provides methods to get road objects metadata, add and remove custom road objects.

Functions

Link copied to clipboard
fun addCustomRoadObject(roadObject: RoadObject)

Adds road object to be tracked in electronic horizon. In case if object with such id already exists updates it.

Link copied to clipboard
fun getRoadObject(roadObjectId: String): RoadObject?

Returns roadObject, if such object cannot be found returns null.

Link copied to clipboard
fun getRoadObjectIdsByEdgeIds(edgeIds: List<Long>): List<String>

Returns list of road object ids which are (partially) belong to edgeIds.

Link copied to clipboard
fun getRoadObjectsOnTheEdge(edgeId: Long): Map<String, RoadObjectEdgeLocation>

Returns mapping road object id -> RoadObjectEdgeLocation for all road objects which are lying on the edge with given id.

Link copied to clipboard
fun getUpcomingRoadObjects(distances: List<RoadObjectDistanceInfo>): List<UpcomingRoadObject>

Returns a list of UpcomingRoadObject

Link copied to clipboard
fun removeAllCustomRoadObjects()

Removes all custom road objects (i.e. stops tracking them in electronic horizon)

Link copied to clipboard
fun removeCustomRoadObject(roadObjectId: String)

Removes custom road object (i.e. stops tracking it in electronic horizon)