Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.mapbox.services.directions.v5.models;

/**
* Object representing lanes in an intersection.
*/
public class IntersectionLanes {

private boolean valid;
private String[] indications;

/**
* @return Boolean value for whether this lane can be taken to complete the maneuver. For
* instance, if the lane array has four objects and the first two are marked as valid, then the
* driver can take either of the left lanes and stay on the route.
* @since 2.0.0
*/
public boolean getValid() {
return valid;
}

/**
* @return Array of signs for each turn lane. There can be multiple signs. For example, a turning
* lane can have a sign with an arrow pointing left and another sign with an arrow pointing
* straight.
* @since 2.0.0
*/
public String[] getIndications() {
return indications;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class StepIntersection {
private boolean[] entry;
private int in;
private int out;
private IntersectionLanes[] lanes;

/**
* @return A [longitude, latitude] pair describing the location of the turn.
Expand Down Expand Up @@ -72,4 +73,14 @@ public int getOut() {
public Position asPosition() {
return Position.fromCoordinates(location[0], location[1]);
}

/**
* @return Array of lane objects that represent the available turn lanes at the intersection. If
* no lane information is available for an intersection, the lanes property will not be present.
* Lanes are provided in their order on the street, from left to right.
* @since 2.0.0
*/
public IntersectionLanes[] getLanes() {
return lanes;
}
}
Loading