mapbox / mapbox/mapbox-navigation-ios

[Bug]: navigationMapView.showRouteDuration(along:) is poorly positioned and color is not switching upon tapping alternative route

Open
#4,165 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug jira-sync-complete
Dominant language
Swift
Stars
918
Forks
326
Avg merge
1h 16m
Merged PRs (30d)
3

Description

### Mapbox Navigation SDK version

2.6.0

### Steps to reproduce

Start a navigationViewController and give it the property navigationMapView?.showRouteDurations(along: routeResponse.routes). Then start the active navigation and tap on alternative Route.

### Expected behavior

-The Label showing the duration for each route should be positioned dynamically, like in other navigation services to avoid being hidden by the users position or to avoid overlapping with other labels of the same type. It should be more or less positioned in the center of the part of the route currently seen in the navigation view.
-The position the label aims at should be somewhere on the route, not beside it.
-There should always be a label showing the duration for every alternative shown on the map
-When tapping on an alternative Route, the blue label should turn white and the white label (former alternative route duration label) should turn blue, to indicate that this is the currently selected route.

### Actual behavior

- The Labels are poorly positioned and are sometimes hidden by overlapping labels or even by the users navigation puck.
- The label aims somewhere beside the route and does not touch the route, which would make more sense.
- Some labels are positioned in a way in which it is not 100% clear to which route they belong (see screenshot below), because they are pointing to a part of the route that is also part of the alternative route
- Sometimes, alternative routes don't show any duration labels. Even the main route is sometimes missing the label
- The labels don't switch color, as to be seen in the screenshots below:

Before tapping the alternatve route:
![IMG_7006](https://user-images.githubusercontent.com/92864392/191461322-c403bfc4-1a3e-4793-a8c7-919963f8a9b4.PNG)

After tapping the alternative route:
![IMG_7007](https://user-images.githubusercontent.com/92864392/191461312-65c35f0d-75fc-460e-a225-8554e28d7594.PNG)

### Is this a one-time issue or a repeatable issue?

repeatable

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 by reproducing the issue in a navigationViewController using navigationMapView?.showRouteDurations(along: routeResponse.routes), then tap an alternative route. Trace the route-duration label behavior from that entry point; done means every displayed route has a route-attached, non-overlapping label and the selected route's label colors switch correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
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.