-
Notifications
You must be signed in to change notification settings - Fork 314
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
Add the ability to show specific route leg with color overriding #2833
Conversation
Now the problem is that the layer and source could be added from the |
0f2852c
to
af02181
Compare
a2700a4
to
d8abfcd
Compare
Fix the opacity expression, now it could allow the overriding route leg color. But it has a problem to display the following vanishing vision during navigation. It seems that there's something wrong with the gradient stops which cause the route line fading away at random place Besides, to make sure both of the vanishing route line and route overriding work, the next step is to update the |
d8abfcd
to
e6f944d
Compare
af02181
to
59e7ba4
Compare
e6f944d
to
f17996b
Compare
75f05fa
to
95cfca9
Compare
bf37f96
to
0c2ec50
Compare
Due to the |
e1b511d
to
2a42cb9
Compare
fbfccd0
to
14e77fa
Compare
a7e38ee
to
cf57162
Compare
cf57162
to
bca8d5a
Compare
f17996b
to
bc07d97
Compare
cabc4b7
to
d08b328
Compare
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.
I've tested with NavigationMapView
and with standalone NavigationViewController
and it seems to work similarly to what was available in 0.40
. It's great to see that fix turned out to be not really complex one.
Description
In 1.x , we're not dealing with the legIndex as in 0.4. This pr is to port the ability to handle specific legIndex for mapView route line.
The way we specify the leg index and change the route layer color should be like following:
The color could be override. If we don't specify the leg Index, the whole route would show congestion color. But if we specify the leg index, only the specified legIndex would show the congestion color, while other legs would show the
routeCasingColor
.Implementation
When generating the congestion features for the whole route, the
CurrentLegAttribute
of the feature property would represent whether this leg is the specified leg. If the route leg is not specified, or it is the specified one, it would be true.Then during the generation of the gradient stops for the route layer, if the
CurrentLegAttribute
is true, we have congestion color, if not, we're using therouteCasingColor
.Screenshots or Gifs
The following is how we show specific route leg with with
The following is that during turn-by turn navigation, the current route leg would be specified with the color overriding. The default specified leg would be the current leg, which is the same as in the 0.4.