-
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
Adds support for polyline6 #287
Conversation
c6cfd41
to
011ae58
Compare
I've fixed up this PR to only add support for precision 6 in the directions api. The route utils refactor will come laster down the road but I don't expect it to break the API. |
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.
A couple of small changes.
@@ -26,6 +26,7 @@ | |||
public static final int GOOGLE_PRECISION = 5; | |||
public static final int OSRM_PRECISION_V4 = 6; | |||
public static final int OSRM_PRECISION_V5 = 5; | |||
public static final int OSRM_PRECISION_6_V5 = 6; |
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.
// We only support polyline encoded geometries to reduce the size of the response. | ||
// If we need the corresponding LineString object, this SDK can do the decoding with | ||
// LineString.fromPolyline(String polyline, int precision). | ||
// by defauly the geometry is polyline with precision 5. | ||
this.geometries = DirectionsCriteria.GEOMETRY_POLYLINE; |
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.
@cammace Let's default to precision 6. That's what I do on MapMatching and the payload isn't much bigger but there's a gain in precision.
008183e
to
f28d5aa
Compare
Closes #207
Closes #288
Bring over the work done in #228 and completes it.