You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NavigationMapView.generateTrafficGradientStops(for:) seems to be calculating incorrect stops for the gradient that colors the route line according to traffic congestion. To the end user, it would seem like the route line has random splotches of red and yellow that don’t look like traffic congestion and don’t correspond to real-world conditions.
The following examples are in the vicinity of 39.2872°N, −84.4656°W near Tri-County Mall in Springdale, Ohio, comparing the example application running navigation SDK v1.0.0-rc.1 with map SDK v6.0.0 against a webpage running mapbox/mapbox-gl-directions#145 (which is based on v4.0.0).
The inaccuracy is more apparent when getting a multileg route in the example application: the segments move considerably between a given single-leg route and a multileg route that includes it. These screenshots were taken within a few seconds of each other; the inconsistency reproduces reliably:
This regression was introduced in #2377. It’s possible that the refactoring suggested in #2423 would improve the situation.
/cc @mapbox/navigation-ios
The text was updated successfully, but these errors were encountered:
In the past, legs other than the “current” leg would’ve been dimmed and shown no traffic congestion segments. This method only uses the leg index to set the MBCurrentLegAttribute (isCurrentLeg) on each leg’s polyline feature, but the code that adjusted the color based on this attribute has been deleted, so nothing looks at this 0 anyways.
generateTrafficGradientStops(for:) iterates over each leg’s line feature but writes the stops into a single NavigationMapView.routeGradientStops property on every iteration. That property only stores a single stop dictionary for each colored layer, effectively commingling the stops for each of the legs along the route.
1ec5
changed the title
Route line displays inaccurate, inconsistent traffic congestion
Traffic congestion colors are misplaced and smeared along the route line
Aug 28, 2020
NavigationMapView.generateTrafficGradientStops(for:)
seems to be calculating incorrect stops for the gradient that colors the route line according to traffic congestion. To the end user, it would seem like the route line has random splotches of red and yellow that don’t look like traffic congestion and don’t correspond to real-world conditions.The following examples are in the vicinity of 39.2872°N, −84.4656°W near Tri-County Mall in Springdale, Ohio, comparing the example application running navigation SDK v1.0.0-rc.1 with map SDK v6.0.0 against a webpage running mapbox/mapbox-gl-directions#145 (which is based on v4.0.0).
The inaccuracy is more apparent when getting a multileg route in the example application: the segments move considerably between a given single-leg route and a multileg route that includes it. These screenshots were taken within a few seconds of each other; the inconsistency reproduces reliably:
This regression was introduced in #2377. It’s possible that the refactoring suggested in #2423 would improve the situation.
/cc @mapbox/navigation-ios
The text was updated successfully, but these errors were encountered: