osmandapp/Osmand — pull request #627 by saiarcot895 (2014-05-06 03:13:20+00:00)
Title: Attempt to display lanes that go in two directions

### Background

In the US (at least), some lanes on interstates may give you the option to go straight (continue on the interstate) or take the exit. Currently, this isn't represented in Osmand; the exit lane is displayed as a separate lane. This patch starts on fixing this.

### Changes

The patch uses 3 bits in the lane value to describe the characteristics of the lane. Bits 0-2 were previously documented in the comments (although I'm not sure if bits 1 and 2 are being used anywhere). Bits 3 and 4 describe whether you can only go straight or if there is a right branch or left branch (note that currently lanes that have a right branch *and* a left branch aren't represented as one lane). Bit 5 specifies whether the branch should be taken or if you should go straight (used in rendering).

These bits are used in the rendering of the lanes. On lanes that have a right/left branch, the KR/KL arrow is used to display the branch from that lane. The KL arrow lines up nicely with the straight arrow, making it appear to come from the same root. However, the KR arrow needs a bit more shifting/tinkering.

### Bugs/Restrictions

One bug mentioned above is that the KR arrow doesn't align with the straight arrow. Another bug is that some roads that have a fork, but don't have lane data, may no longer show the lane window. One restriction is that this is *only* for the cases where the right-most lane can go straight or go right and/or the left-most lane can go straight or go left. For all other cases, the old behavior *should* be used. The eventual behavior is that this is extended for any number of lanes.