Assigned
Status Update
Comments
la...@google.com <la...@google.com>
la...@google.com <la...@google.com> #2
Good day,
For accessing lane information, you may retrieve StepInfo
object which determines the current navigation step. From there, use the method getLanes();
to obtain the list of Lane
objects representing the lanes at the end of the current step.
List<lane> lanes = currentStepInfo.getLanes();
You can use the public method isRecommended()
to specify if the lane is recommended. The idea is to iterate through each Lane
object and examine if it's recommended:
for (Lane lane: lanes) {
List<LaneDirection> laneDirections = lane.laneDirections();
for (LaneDirection direction : laneDirections) {
int laneShape = direction.laneShape();
boolean isRecommended = direction.isRecommended();
}
}
The laneShape()
method returns an integer relative to a lane direction such as left, right or straight.
Description
I am a developer from China, and I want to display lane information in the navigation interface (please see the attached document). Additionally, I would like to know how many lanes are currently available, what type each lane is, and which lane is recommended for driving. How can I extract this information?