Skip to content

Commit 3b9af1d

Browse files
committed
fix expressions for masking layers
1 parent 94d6193 commit 3b9af1d

File tree

4 files changed

+454
-26
lines changed

4 files changed

+454
-26
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fixed an issue where the route lines didn't apply `RouteLineResources`'s custom scale expressions correctly.

libnavui-maps/src/main/java/com/mapbox/navigation/ui/maps/route/line/api/MapboxRouteLineView.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,14 @@ class MapboxRouteLineView @VisibleForTesting internal constructor(
155155
LAYER_GROUP_3_RESTRICTED,
156156
MASKING_LAYER_RESTRICTED
157157
)
158+
private val maskingRouteLineLayerGroup = setOf(
159+
MASKING_LAYER_MAIN,
160+
MASKING_LAYER_CASING,
161+
MASKING_LAYER_TRAIL,
162+
MASKING_LAYER_TRAFFIC,
163+
MASKING_LAYER_TRAIL_CASING,
164+
MASKING_LAYER_RESTRICTED,
165+
)
158166
private val sourceToFeatureMap = mutableMapOf<RouteLineSourceKey, RouteLineFeatureId>(
159167
Pair(MapboxRouteLineUtils.layerGroup1SourceKey, RouteLineFeatureId(null)),
160168
Pair(MapboxRouteLineUtils.layerGroup2SourceKey, RouteLineFeatureId(null)),
@@ -1156,7 +1164,7 @@ class MapboxRouteLineView @VisibleForTesting internal constructor(
11561164
.union(trafficLayerIds)
11571165
.forEach {
11581166
when (it) {
1159-
in primaryRouteLineLayerGroup -> {
1167+
in primaryRouteLineLayerGroup + maskingRouteLineLayerGroup -> {
11601168
when (it) {
11611169
in casingLayerIds -> {
11621170
options.resourceProvider.routeCasingLineScaleExpression

0 commit comments

Comments
 (0)