Skip to content

Commit 6d14385

Browse files
committed
more logs
1 parent 0e0c1f7 commit 6d14385

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

gradle/artifact-settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ext {
1212
mapboxArtifactLicenseUrl = 'https://www.mapbox.com/legal/tos/'
1313
snapshot = project.hasProperty("snapshot") ? project.property("snapshot").toBoolean() : false
1414
releaseTagPrefix = project.hasProperty('RELEASE_TAG_PREFIX') ? project.property('RELEASE_TAG_PREFIX') : 'v'
15-
versionName = '2.13.0-route-line-2-SNAPSHOT'
15+
versionName = '2.13.0-route-line-3-SNAPSHOT'
1616
}
1717

1818
def getVersionName() {

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ class MapboxRouteLineApi(
255255
trafficBackfillRoadClasses.addAll(
256256
routeLineOptions.resourceProvider.trafficBackfillRoadClasses
257257
)
258+
logI("BelowLayerId: ${routeLineOptions.routeLineBelowLayerId}", LOG_CATEGORY)
258259
}
259260

260261
/**
@@ -1021,6 +1022,8 @@ class MapboxRouteLineApi(
10211022
routeLineOptions.resourceProvider.routeLineColorResources,
10221023
restrictedExpressionData
10231024
)
1025+
logI("Masking layer main exp: $mainExp", LOG_CATEGORY)
1026+
logI("Masking layer traffic exp: $trafficExp", LOG_CATEGORY)
10241027

10251028
return RouteLineDynamicData(
10261029
{ mainExp },

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import com.mapbox.navigation.ui.maps.route.line.model.RouteLineUpdateValue
6363
import com.mapbox.navigation.ui.maps.route.line.model.RouteSetValue
6464
import com.mapbox.navigation.utils.internal.ifNonNull
6565
import com.mapbox.navigation.utils.internal.logE
66+
import com.mapbox.navigation.utils.internal.logI
6667
import org.jetbrains.annotations.TestOnly
6768

6869
/**
@@ -169,6 +170,10 @@ class MapboxRouteLineView @VisibleForTesting internal constructor(
169170
Pair(MapboxRouteLineUtils.layerGroup3SourceKey, RouteLineFeatureId(null))
170171
)
171172

173+
init {
174+
logI("BelowLayerId: ${options.routeLineBelowLayerId}", TAG)
175+
}
176+
172177
@TestOnly
173178
internal fun initPrimaryRouteLineLayerGroup(layerIds: Set<String>) {
174179
primaryRouteLineLayerGroup = layerIds
@@ -244,6 +249,10 @@ class MapboxRouteLineView @VisibleForTesting internal constructor(
244249
callback: RoutesRenderedCallbackWrapper?
245250
) {
246251
rebuildSourcesAndLayersIfNeeded(style)
252+
logI("Layers size: ${style.styleLayers.size}", TAG)
253+
style.styleLayers.forEach {
254+
logI("${it.id} properties: ${style.getStyleLayerProperties(it.id).value}", TAG)
255+
}
247256
val primaryRouteTrafficVisibility = getTrafficVisibility(style)
248257
val primaryRouteVisibility = getPrimaryRouteVisibility(style)
249258
val alternativeRouteVisibility = getAlternativeRoutesVisibility(style)
@@ -430,6 +439,11 @@ class MapboxRouteLineView @VisibleForTesting internal constructor(
430439
.forEach { mutationCommand ->
431440
mutationCommand()
432441
}
442+
443+
logI("Layers moved. New order:", TAG)
444+
style.styleLayers.forEach {
445+
logI("After render ${it.id} properties: ${style.getStyleLayerProperties(it.id).value}", TAG)
446+
}
433447
}
434448

435449
private fun getRelatedSourceKey(
@@ -459,6 +473,7 @@ class MapboxRouteLineView @VisibleForTesting internal constructor(
459473
}
460474
}
461475

476+
val trafficProvider = it.routeLineMaskingLayerDynamicData?.trafficExpressionProvider
462477
ifNonNull(it.routeLineMaskingLayerDynamicData) { overlayData ->
463478
overlayData.restrictedSectionExpressionProvider?.apply {
464479
getExpressionUpdateFun(MASKING_LAYER_RESTRICTED, this)(style)
@@ -490,9 +505,13 @@ class MapboxRouteLineView @VisibleForTesting internal constructor(
490505
if (
491506
overlayData.baseExpressionProvider !is RouteLineTrimExpressionProvider
492507
) {
508+
logI("Move layers up.", TAG)
493509
getMaskingLayerMoveCommands(style).forEach { mutationCommand ->
494510
mutationCommand()
495511
}
512+
style.styleLayers.forEach {
513+
logI("Moved up ${it.id} properties: ${style.getStyleLayerProperties(it.id).value}", TAG)
514+
}
496515
}
497516
}
498517
}

0 commit comments

Comments
 (0)