Skip to content

Commit 5927efb

Browse files
committed
more logs
1 parent 0e0c1f7 commit 5927efb

File tree

5 files changed

+76
-66
lines changed

5 files changed

+76
-66
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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ class MapboxRouteLineApi(
255255
trafficBackfillRoadClasses.addAll(
256256
routeLineOptions.resourceProvider.trafficBackfillRoadClasses
257257
)
258+
logI("BelowLayerId: ${routeLineOptions.routeLineBelowLayerId}", LOG_CATEGORY)
259+
logI("All options: $routeLineOptions", LOG_CATEGORY)
258260
}
259261

260262
/**
@@ -1021,6 +1023,8 @@ class MapboxRouteLineApi(
10211023
routeLineOptions.resourceProvider.routeLineColorResources,
10221024
restrictedExpressionData
10231025
)
1026+
logI("Masking layer main exp: $mainExp", LOG_CATEGORY)
1027+
logI("Masking layer traffic exp: $trafficExp", LOG_CATEGORY)
10241028

10251029
return RouteLineDynamicData(
10261030
{ mainExp },

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

Lines changed: 20 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,11 @@ class MapboxRouteLineView @VisibleForTesting internal constructor(
169170
Pair(MapboxRouteLineUtils.layerGroup3SourceKey, RouteLineFeatureId(null))
170171
)
171172

173+
init {
174+
logI("BelowLayerId: ${options.routeLineBelowLayerId}", TAG)
175+
logI("All options: $options", TAG)
176+
}
177+
172178
@TestOnly
173179
internal fun initPrimaryRouteLineLayerGroup(layerIds: Set<String>) {
174180
primaryRouteLineLayerGroup = layerIds
@@ -244,6 +250,10 @@ class MapboxRouteLineView @VisibleForTesting internal constructor(
244250
callback: RoutesRenderedCallbackWrapper?
245251
) {
246252
rebuildSourcesAndLayersIfNeeded(style)
253+
logI("Layers size: ${style.styleLayers.size}", TAG)
254+
style.styleLayers.forEach {
255+
logI("${it.id} properties: ${style.getStyleLayerProperties(it.id).value}", TAG)
256+
}
247257
val primaryRouteTrafficVisibility = getTrafficVisibility(style)
248258
val primaryRouteVisibility = getPrimaryRouteVisibility(style)
249259
val alternativeRouteVisibility = getAlternativeRoutesVisibility(style)
@@ -430,6 +440,11 @@ class MapboxRouteLineView @VisibleForTesting internal constructor(
430440
.forEach { mutationCommand ->
431441
mutationCommand()
432442
}
443+
444+
logI("Layers moved. New order:", TAG)
445+
style.styleLayers.forEach {
446+
logI("After render ${it.id} properties: ${style.getStyleLayerProperties(it.id).value}", TAG)
447+
}
433448
}
434449

435450
private fun getRelatedSourceKey(
@@ -459,6 +474,7 @@ class MapboxRouteLineView @VisibleForTesting internal constructor(
459474
}
460475
}
461476

477+
val trafficProvider = it.routeLineMaskingLayerDynamicData?.trafficExpressionProvider
462478
ifNonNull(it.routeLineMaskingLayerDynamicData) { overlayData ->
463479
overlayData.restrictedSectionExpressionProvider?.apply {
464480
getExpressionUpdateFun(MASKING_LAYER_RESTRICTED, this)(style)
@@ -490,9 +506,13 @@ class MapboxRouteLineView @VisibleForTesting internal constructor(
490506
if (
491507
overlayData.baseExpressionProvider !is RouteLineTrimExpressionProvider
492508
) {
509+
logI("Move layers up.", TAG)
493510
getMaskingLayerMoveCommands(style).forEach { mutationCommand ->
494511
mutationCommand()
495512
}
513+
style.styleLayers.forEach {
514+
logI("Moved up ${it.id} properties: ${style.getStyleLayerProperties(it.id).value}", TAG)
515+
}
496516
}
497517
}
498518
}

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

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -137,39 +137,6 @@ class RouteLineColorResources private constructor(
137137
.inActiveRouteLegsColor(inActiveRouteLegsColor)
138138
}
139139

140-
/**
141-
* Returns a string representation of the object.
142-
*/
143-
override fun toString(): String {
144-
return "RouteLineColorResources(" +
145-
"lowCongestionRange=$lowCongestionRange, " +
146-
"heavyCongestionRange=$heavyCongestionRange, " +
147-
"severeCongestionRange=$severeCongestionRange, " +
148-
"moderateCongestionRange=$moderateCongestionRange, " +
149-
"routeDefaultColor=$routeDefaultColor, " +
150-
"routeLowCongestionColor=$routeLowCongestionColor, " +
151-
"routeModerateCongestionColor=$routeModerateCongestionColor, " +
152-
"routeHeavyCongestionColor=$routeHeavyCongestionColor, " +
153-
"routeSevereCongestionColor=$routeSevereCongestionColor, " +
154-
"routeUnknownCongestionColor=$routeUnknownCongestionColor, " +
155-
"routeClosureColor=$routeClosureColor, " +
156-
"restrictedRoadColor=$restrictedRoadColor, " +
157-
"alternativeRouteDefaultColor=$alternativeRouteDefaultColor, " +
158-
"alternativeRouteLowCongestionColor=$alternativeRouteLowCongestionColor, " +
159-
"alternativeRouteModerateCongestionColor=$alternativeRouteModerateCongestionColor, " +
160-
"alternativeRouteHeavyCongestionColor=$alternativeRouteHeavyCongestionColor, " +
161-
"alternativeRouteSevereCongestionColor=$alternativeRouteSevereCongestionColor, " +
162-
"alternativeRouteUnknownCongestionColor=$alternativeRouteUnknownCongestionColor, " +
163-
"alternativeRouteRestrictedRoadColor=$alternativeRouteRestrictedRoadColor, " +
164-
"alternativeRouteClosureColor=$alternativeRouteClosureColor, " +
165-
"routeLineTraveledColor=$routeLineTraveledColor, " +
166-
"routeLineTraveledCasingColor=$routeLineTraveledCasingColor, " +
167-
"routeCasingColor=$routeCasingColor, " +
168-
"alternativeRouteCasingColor=$alternativeRouteCasingColor, " +
169-
"inActiveRouteLegsColor=$inActiveRouteLegsColor" +
170-
")"
171-
}
172-
173140
/**
174141
* Returns a hash code value for the object.
175142
*/
@@ -256,6 +223,36 @@ class RouteLineColorResources private constructor(
256223
return true
257224
}
258225

226+
override fun toString(): String {
227+
return "RouteLineColorResources(" +
228+
"lowCongestionRange=$lowCongestionRange, " +
229+
"moderateCongestionRange=$moderateCongestionRange, " +
230+
"heavyCongestionRange=$heavyCongestionRange, " +
231+
"severeCongestionRange=$severeCongestionRange, " +
232+
"routeDefaultColor=$routeDefaultColor, " +
233+
"routeLowCongestionColor=$routeLowCongestionColor, " +
234+
"routeModerateCongestionColor=$routeModerateCongestionColor, " +
235+
"routeHeavyCongestionColor=$routeHeavyCongestionColor, " +
236+
"routeSevereCongestionColor=$routeSevereCongestionColor, " +
237+
"routeUnknownCongestionColor=$routeUnknownCongestionColor, " +
238+
"alternativeRouteDefaultColor=$alternativeRouteDefaultColor, " +
239+
"alternativeRouteLowCongestionColor=$alternativeRouteLowCongestionColor, " +
240+
"alternativeRouteModerateCongestionColor=$alternativeRouteModerateCongestionColor, " +
241+
"alternativeRouteHeavyCongestionColor=$alternativeRouteHeavyCongestionColor, " +
242+
"alternativeRouteSevereCongestionColor=$alternativeRouteSevereCongestionColor, " +
243+
"alternativeRouteUnknownCongestionColor=$alternativeRouteUnknownCongestionColor, " +
244+
"restrictedRoadColor=$restrictedRoadColor, " +
245+
"routeClosureColor=$routeClosureColor, " +
246+
"alternativeRouteRestrictedRoadColor=$alternativeRouteRestrictedRoadColor, " +
247+
"alternativeRouteClosureColor=$alternativeRouteClosureColor, " +
248+
"routeLineTraveledColor=$routeLineTraveledColor, " +
249+
"routeLineTraveledCasingColor=$routeLineTraveledCasingColor, " +
250+
"routeCasingColor=$routeCasingColor, " +
251+
"alternativeRouteCasingColor=$alternativeRouteCasingColor, " +
252+
"inActiveRouteLegsColor=$inActiveRouteLegsColor" +
253+
")"
254+
}
255+
259256
/**
260257
* A builder for instantiating the RouteLineResources class
261258
*/

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

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -74,38 +74,6 @@ class RouteLineResources private constructor(
7474
.restrictedRoadLineWidth(restrictedRoadLineWidth)
7575
}
7676

77-
/**
78-
* Returns a string representation of the object.
79-
*/
80-
override fun toString(): String {
81-
return "RouteLineResources(" +
82-
"routeLineColorResources=$routeLineColorResources, " +
83-
"roundedLineCap=$roundedLineCap, " +
84-
"originWaypointIcon=$originWaypointIcon, " +
85-
"destinationWaypointIcon=$destinationWaypointIcon, " +
86-
"routeLineScaleExpression=$routeLineScaleExpression, " +
87-
"routeCasingLineScaleExpression=$routeCasingLineScaleExpression, " +
88-
"routeTrafficLineScaleExpression=$routeTrafficLineScaleExpression, " +
89-
"trafficBackfillRoadClasses=$trafficBackfillRoadClasses, " +
90-
"alternativeRouteLineScaleExpression=$alternativeRouteLineScaleExpression, " +
91-
"alternativeRouteCasingLineScaleExpression=" +
92-
"$alternativeRouteCasingLineScaleExpression, " +
93-
"alternativeRouteTrafficLineScaleExpression=" +
94-
"$alternativeRouteTrafficLineScaleExpression, " +
95-
"routeLineColorResources=$routeLineColorResources, " +
96-
"roundedLineCap=$roundedLineCap, " +
97-
"originWaypointIcon=$originWaypointIcon, " +
98-
"destinationWaypointIcon=$destinationWaypointIcon, " +
99-
"routeLineScaleExpression=$routeLineScaleExpression, " +
100-
"routeCasingLineScaleExpression=$routeCasingLineScaleExpression, " +
101-
"routeTrafficLineScaleExpression=$routeTrafficLineScaleExpression, " +
102-
"trafficBackfillRoadClasses=$trafficBackfillRoadClasses, " +
103-
"restrictedRoadDashArray=$restrictedRoadDashArray, " +
104-
"restrictedRoadOpacity=$restrictedRoadOpacity, " +
105-
"restrictedRoadLineWidth=$restrictedRoadLineWidth" +
106-
")"
107-
}
108-
10977
/**
11078
* Indicates whether some other object is "equal to" this one.
11179
*/
@@ -166,6 +134,27 @@ class RouteLineResources private constructor(
166134
return result
167135
}
168136

137+
override fun toString(): String {
138+
return "RouteLineResources(" +
139+
"routeLineColorResources=$routeLineColorResources, " +
140+
"roundedLineCap=$roundedLineCap, " +
141+
"originWaypointIcon=$originWaypointIcon, " +
142+
"destinationWaypointIcon=$destinationWaypointIcon, " +
143+
"trafficBackfillRoadClasses=$trafficBackfillRoadClasses, " +
144+
"routeLineScaleExpression=$routeLineScaleExpression, " +
145+
"routeCasingLineScaleExpression=$routeCasingLineScaleExpression, " +
146+
"routeTrafficLineScaleExpression=$routeTrafficLineScaleExpression, " +
147+
"alternativeRouteLineScaleExpression=$alternativeRouteLineScaleExpression, " +
148+
"alternativeRouteCasingLineScaleExpression=" +
149+
"$alternativeRouteCasingLineScaleExpression, " +
150+
"alternativeRouteTrafficLineScaleExpression=" +
151+
"$alternativeRouteTrafficLineScaleExpression, " +
152+
"restrictedRoadDashArray=$restrictedRoadDashArray, " +
153+
"restrictedRoadOpacity=$restrictedRoadOpacity, " +
154+
"restrictedRoadLineWidth=$restrictedRoadLineWidth" +
155+
")"
156+
}
157+
169158
/**
170159
* A builder for instantiating the RouteLineResources class
171160
*/

0 commit comments

Comments
 (0)