Permalink
Browse files

Fix #799 by separating out steps when roundabout status changes.

  • Loading branch information...
Matt Conway
Matt Conway committed Aug 20, 2012
1 parent 44b40f5 commit 90590618fa511ff8cee9983995b8823db3bd3aec
@@ -674,9 +674,11 @@ private Place makePlace(State state, boolean time) {
step.setAbsoluteDirection(thisAngle);
// new step, set distance to length of first edge
distance = edge.getDistance();
- } else if ((step.streetName != null && !step.streetNameNoParens().equals(streetNameNoParens))
- && (!step.bogusName || !edge.hasBogusName())) {
- /* street name has changed */
+ } else if (((step.streetName != null && !step.streetNameNoParens().equals(streetNameNoParens))
+ && (!step.bogusName || !edge.hasBogusName())) ||
+ // if we are on a roundabout now and weren't before, start a new step
+ edge.isRoundabout() != (roundaboutExit > 0)) {
+ /* street name has changed, or we've changed state from a roundabout to a street */
if (roundaboutExit > 0) {
// if we were just on a roundabout,
// make note of which exit was taken in the existing step

0 comments on commit 9059061

Please sign in to comment.