-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Add roundaboutExits param to MapboxDirections #562
Changes from 1 commit
586f894
29d4ef9
8fadb9b
692d95d
99bafb0
72d769b
2645082
1c3cbae
ff00d93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,8 @@ private Call<DirectionsResponse> getCall() { | |
builder.getBearings(), | ||
builder.isContinueStraight(), | ||
builder.getAnnotation(), | ||
builder.getLanguage()); | ||
builder.getLanguage(), | ||
builder.isRoundaboutExits()); | ||
|
||
// Done | ||
return call; | ||
|
@@ -149,6 +150,7 @@ public static class Builder<T extends Builder> extends MapboxBuilder { | |
private Position destination = null; | ||
private String[] annotation = null; | ||
private String language = null; | ||
private Boolean roundaboutExits = null; | ||
|
||
/** | ||
* Constructor | ||
|
@@ -373,6 +375,17 @@ public T setLanguage(String language) { | |
return (T) this; | ||
} | ||
|
||
/** | ||
* Optionally, call if you'd like to specify if exit on a roundabout is allowed. | ||
* | ||
* @param roundaboutExits true if exit on a roundabout is allowed. | ||
* @return Builder | ||
* @since 2.2.4 | ||
*/ | ||
public T setRoundaboutExits(Boolean roundaboutExits) { | ||
this.roundaboutExits = roundaboutExits; | ||
return (T) this; | ||
} | ||
/* | ||
* Getters, they return the value in a format ready for the API to consume | ||
*/ | ||
|
@@ -590,6 +603,14 @@ public T setBaseUrl(String baseUrl) { | |
return (T) this; | ||
} | ||
|
||
/** | ||
* @return true it is possible to exit on the roundabout {@link #setRoundaboutExits(Boolean)}. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A more descriptive doc for this given the below would be "return true if you enabled additional instructions while exiting rotaries and roundabouts." |
||
* @since 2.2.4 | ||
*/ | ||
public Boolean isRoundaboutExits() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we change this to something like |
||
return roundaboutExits; | ||
} | ||
|
||
/** | ||
* Build method | ||
* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Optionally, set this to true if you want to enable instructions while exiting roundabouts and rotaries."