mapbox / mapbox/mapbox-navigation-android
Mapbox traffic layer data is not matching with Directions API response
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
Hi Team,
I am using mapbox dropInUi for my application. I was testing the traffic congestion and the gradient in the past few days.
Initially I have tested the locations in Canada and now I have also tested for the USA. Based on the data-driven-lines(traffic layer) moderate and heavy congestion are available for the particular route. But When I check the directions response, I am only getting low and unknown congestion. Here, it looks like the API response is not matching with the traffic layer data. Because of this issue, I think the gradient for the moderate, heavy and severe congestion is not filling the color in the area where the traffic layer shows traffic data.
For my testing I took the origin coordinates as 77.61243502079341,43.15548234143158 and destination is -77.56827,43.174277 and these are my results. It is applicable for most of the routes. I am not sure why traffic layer data is not matching with Directions API response. This is my API request - https://api.mapbox.com/directions/v5/mapbox/driving-traffic/-77.61243502079341%2C43.15548234143158%3B-77.56827%2C43.174277?alternatives=true&annotations=distance%2Cduration%2Cspeed%2Ccongestion&exclude=toll&geometries=polyline6&language=en&overview=full&steps=true&access_token=----------------------
[jsonresponse.txt](https://github.com/mapbox/mapbox-navigation-android/files/9450621/jsonresponse.txt)
Please check the Directions API response. It has only low and unknown congestions.



**com.mapbox.navigation:ui-dropin:2.8.0-alpha.3.**
### Steps to trigger behavior
1. Try any original and destination coordinates in USA or Canada
2. Draw the route line
3. Start navigation
### Traffic layer congestion should be filled with gradient congestion in the route line.
### In current behavior the traffic layer data is not matching with directions API response congestions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied Directions API request, coordinates, jsonresponse.txt, and screenshots; compare the congestion annotations with the traffic gradient in ui-dropin 2.8.0-alpha.3. Reproduce the route in the USA or Canada and determine whether the mismatch is in the API response or rendered route. Done means the source of the discrepancy is identified and the displayed congestion matches the verified data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- api, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100