Interface DrivingRoute

Warning

This feature is available in the Full MapKit SDK version

Package com.yandex.mapkit.directions.driving

interface DrivingRoute

Driving route.

A route consists of multiple sections. Each section has a corresponding annotation that describes the action at the beginning of the section.

Summary

Methods

Type and modifiers

Method and Description

java.lang.String

getRouteId()
The ID of the route.

DrivingRouteMetadata

getMetadata()
The route metadata.

java.util.List<DrivingSection>

getSections()
Manoeuvre-to-Manoeuvre route sections.

Polyline

getGeometry()
Route geometry.

java.util.List<JamSegment>

getJamSegments()
Traffic conditions on the given route.

java.util.List<Event>

getEvents()
Events on the given route.

java.util.List<java.lang.Float>

getSpeedLimits()
Speed limits for segments in the geometry.

VehicleOptions

getVehicleOptions()
Vehicle options.

java.util.List<LaneSign>

getLaneSigns()
Lane signs.

java.util.List<DirectionSign>

getDirectionSigns()
Direction signs.

java.util.List<RestrictedEntry>

getRestrictedEntries()
Route restricted entries.

java.util.List<TrafficLight>

getTrafficLights()
Route traffic lights.

java.util.List<RestrictedTurn>

getRestrictedTurns()
Route points with time-dependent restrictions.

java.util.List<RailwayCrossing>

getRailwayCrossings()
Railway crossings

java.util.List<PedestrianCrossing>

getPedestrianCrossings()
Pedestrian crossings

java.util.List<SpeedBump>

getSpeedBumps()
Speed bumps

java.util.List<Checkpoint>

getCheckpoints()
Checkpoints

java.util.List<RuggedRoad>

getRuggedRoads()
Route roads.

java.util.List<TollRoad>

getTollRoads()

java.util.List<FordCrossing>

getFordCrossings()

java.util.List<Ferry>

getFerries()

java.util.List<Highway>

getHighways()

java.util.List<Tunnel>

getTunnels()

java.util.List<ZoneCrossing>

getZoneCrossings()

java.util.List<RoadVehicleRestriction>

getRoadVehicleRestrictions()
Route vehicle restrictions.

java.util.List<ManoeuvreVehicleRestriction>

getManoeuvreVehicleRestrictions()

AnnotationLanguage

getAnnotationLanguage()
Language of string annotations (for example street names) in this route object.

java.util.List<RequestPoint>

getRequestPoints()
Request points that were specified in the router request that this route originated from.

PolylinePosition

getPosition()
The reached position on the given route.

void

setPosition(@NonNull PolylinePosition position)

RoutePosition

getRoutePosition()
The reached position on the given route.

int

getLegIndex()
A leg is a section of the route between two consecutive waypoints.

void

setLegIndex(int legIndex)

boolean

isAreConditionsOutdated()
Indicates whether driving conditions (jamSegments and events) have become outdated when we are not able to fetch updates for some predefined time.

void

addConditionsListener(@NonNull java.lang.ref.WeakReference<ConditionsListener> conditionsListener)
Adds a listener for route condition changes.

void

removeConditionsListener(@NonNull java.lang.ref.WeakReference<ConditionsListener> conditionsListener)
Removes the listener for route condition changes.

int

sectionIndex(int segmentIndex)
Section index.

DrivingRouteMetadata

metadataAt(@NonNull PolylinePosition position)
Metadata location.

java.util.List<PolylinePosition>

getWayPoints()
Polyline positions of waypoints including start and finish point.

void

requestConditionsUpdate()

Methods

getRouteId

@NonNull
java.lang.String getRouteId()

The ID of the route.


getMetadata

@NonNull
DrivingRouteMetadata getMetadata()

The route metadata.


getSections

@NonNull
java.util.List<DrivingSection> getSections()

Manoeuvre-to-Manoeuvre route sections.


getGeometry

@NonNull
Polyline getGeometry()

Route geometry.


getJamSegments

@NonNull
java.util.List<JamSegment> getJamSegments()

Traffic conditions on the given route.


getEvents

@NonNull
java.util.List<Event> getEvents()

Events on the given route.


getSpeedLimits

@NonNull
java.util.List<java.lang.Float> getSpeedLimits()

Speed limits for segments in the geometry.


getVehicleOptions

@NonNull
VehicleOptions getVehicleOptions()

Vehicle options.


getLaneSigns

@NonNull
java.util.List<LaneSign> getLaneSigns()

Lane signs.


getDirectionSigns

@NonNull
java.util.List<DirectionSign> getDirectionSigns()

Direction signs.


getRestrictedEntries

@NonNull
java.util.List<RestrictedEntry> getRestrictedEntries()

Route restricted entries.


getTrafficLights

@NonNull
java.util.List<TrafficLight> getTrafficLights()

Route traffic lights.


getRestrictedTurns

@NonNull
java.util.List<RestrictedTurn> getRestrictedTurns()

Route points with time-dependent restrictions.


getRailwayCrossings

@NonNull
java.util.List<RailwayCrossing> getRailwayCrossings()

Railway crossings


getPedestrianCrossings

@NonNull
java.util.List<PedestrianCrossing> getPedestrianCrossings()

Pedestrian crossings


getSpeedBumps

@NonNull
java.util.List<SpeedBump> getSpeedBumps()

Speed bumps


getCheckpoints

@NonNull
java.util.List<Checkpoint> getCheckpoints()

Checkpoints


getRuggedRoads

@NonNull
java.util.List<RuggedRoad> getRuggedRoads()

Route roads.


getTollRoads

@NonNull
java.util.List<TollRoad> getTollRoads()


getFordCrossings

@NonNull
java.util.List<FordCrossing> getFordCrossings()


getFerries

@NonNull
java.util.List<Ferry> getFerries()


getHighways

@NonNull
java.util.List<Highway> getHighways()


getTunnels

@NonNull
java.util.List<Tunnel> getTunnels()


getZoneCrossings

@NonNull
java.util.List<ZoneCrossing> getZoneCrossings()


getRoadVehicleRestrictions

@NonNull
java.util.List<RoadVehicleRestriction> getRoadVehicleRestrictions()

Route vehicle restrictions.


getManoeuvreVehicleRestrictions

@NonNull
java.util.List<ManoeuvreVehicleRestriction> getManoeuvreVehicleRestrictions()


getAnnotationLanguage

@Nullable
AnnotationLanguage getAnnotationLanguage()

Language of string annotations (for example street names) in this route object.

Optional property, can be null.


getRequestPoints

@Nullable
java.util.List<RequestPoint> getRequestPoints()

Request points that were specified in the router request that this route originated from.

Optional property, can be null.


getPosition

@NonNull
PolylinePosition getPosition()

The reached position on the given route.

The 'RouteMetadata::weight' field contains data for the part of the route beyond this position.


setPosition

void setPosition(@NonNull PolylinePosition position)


getRoutePosition

@NonNull
RoutePosition getRoutePosition()

The reached position on the given route.

The 'RouteMetadata::weight' field contains data for the part of the route beyond this position.


getLegIndex

int getLegIndex()

A leg is a section of the route between two consecutive waypoints.


setLegIndex

void setLegIndex(int legIndex)


isAreConditionsOutdated

boolean isAreConditionsOutdated()

Indicates whether driving conditions (jamSegments and events) have become outdated when we are not able to fetch updates for some predefined time.


addConditionsListener

void addConditionsListener(@NonNull java.lang.ref.WeakReference<ConditionsListener> conditionsListener)

Adds a listener for route condition changes.

The class does not retain the object in the 'conditionsListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.


removeConditionsListener

void removeConditionsListener(@NonNull java.lang.ref.WeakReference<ConditionsListener> conditionsListener)

Removes the listener for route condition changes.

The class does not retain the object in the 'conditionsListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.


sectionIndex

int sectionIndex(int segmentIndex)

Section index.


metadataAt

@NonNull
DrivingRouteMetadata metadataAt(@NonNull PolylinePosition position)

Metadata location.


getWayPoints

@NonNull
java.util.List<PolylinePosition> getWayPoints()

Polyline positions of waypoints including start and finish point.


requestConditionsUpdate

void requestConditionsUpdate()