Skip to content

Commit ca03770

Browse files
Seth Bourgetabhishek1508
authored andcommitted
Added addtional documentation regarding the default route line color and the layering of the route lines.
1 parent 6e94853 commit ca03770

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

libnavui-maps/src/main/java/com/mapbox/navigation/ui/maps/route/line/model/RouteLineColorResources.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ import com.mapbox.navigation.ui.maps.route.RouteLayerConstants
6565
* - severeCongestionRange: 80..100
6666
* If the route response contains a congestion number 45, it would be treated as `unknown` because
6767
* it doesn't exist in any of the ranges specified.
68+
*
69+
* A note on visualizing route line colors: The route line is made up of several stacked line layers.
70+
* The top most line layer is the traffic line followed by the main route line beneath it. By default both lines
71+
* have the same width so the traffic line obscures the main line. Also the default route line color
72+
* and the color used for unknown and low traffic congestion is the same.
73+
*
74+
* Be mindful of this if you change the default route line color because if the traffic data in the route
75+
* is unknown the route line will appear as having the unknown traffic color rather than the default
76+
* route line color. In this case consider also changing the unknown/low traffic color to match the
77+
* default route line color or setting the traffic congestion color(s) to something like
78+
* Color.Transparent if it fits your use case.
6879
*/
6980
class RouteLineColorResources private constructor(
7081
val lowCongestionRange: IntRange,

0 commit comments

Comments
 (0)