Skip to content

Traffic congestion colors are misplaced and smeared along the route line #2574

@1ec5

Description

@1ec5

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).

kemper

tri-county

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:

2 3

This regression was introduced in #2377. It’s possible that the refactoring suggested in #2423 would improve the situation.

/cc @mapbox/navigation-ios

Metadata

Metadata

Assignees

Labels

bugSomething isn’t workingrelease blockerNeeds to be resolved before the release.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions