mapbox / mapbox/mapbox-navigation-android

Mapbox traffic layer data is not matching with Directions API response

Open
#6,240 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

jira-sync-complete
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.

![Screenshot_20220829-230928](https://user-images.githubusercontent.com/95765713/187373669-714bbdea-cbb6-4a3c-b790-eda3d7f479f3.png)
![mpaissue](https://user-images.githubusercontent.com/95765713/187373724-301404a6-5744-4337-b8be-73360eb008b6.png)
![Screenshot_20220829-231022](https://user-images.githubusercontent.com/95765713/187373745-8ccb1502-01ec-4d67-89b2-e202c0792ec6.png)

**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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.