mapbox / mapbox-navigation-ios

Turn-by-turn navigation logic and UI in Swift on iOS
https://docs.mapbox.com/ios/navigation/
Other
861 stars 314 forks source link

Way name label should use current route step #590

Closed ericrwolfe closed 6 years ago

ericrwolfe commented 7 years ago

The way name label should use the information in the current route step from the direction's API's route response, rather than querying for rendered features in the map.

This will allow us to be consistent with our turn banner and remove the "ceremonial" highway names from the way name label (replacing them with the proper ref codes). If the user goes off route, we shouldn't be showing the way name label at all.

cc @bsudekum @frederoni

bsudekum commented 7 years ago

@1ec5 I know you had your reasons against this, mind reminding me?

I think as long as the user is snapped to the route line, it should be fine to show the current step name.

1ec5 commented 7 years ago

There’s no guarantee that the way name of the current step applies to the entire step, only that it applies to the first intersection on the step:

Given all these processing steps, it’s highly likely that we’d leave a misleading road name in a prominent location on screen. Ultimately, the purpose of the current road name label is different than most of the other UI provided by the navigation SDK: it’s meant to amplify information that’s already labeled on the map, rather than supplementing the map with additional information.

This will allow us to be consistent with our turn banner and remove the "ceremonial" highway names from the way name label (replacing them with the proper ref codes).

Removing freeway names is the easy part. Replacing them with fully qualified textual route numbers is more difficult. But we do have enough information to display a graphical route shield that’s consistent with the map. If it’s a high priority to remove freeway names from this label, then I’d suggest hiding the current road label when the road is a freeway. We can get that information from either the route or the vector tiles (via #297).

/ref mapbox/mapbox-navigation-ios#193

ericrwolfe commented 7 years ago

All of the above can be added as annotations or other metadata within our directions API. cc @willwhite @miccolis @hdaymon

Using the map style to display the current way name is an elaborate hack that is buggy and prone to error. For the majority of time spent on most of my drives (read: highways), the way name either displays the wrong name or none at all.

Let's plan to move forward and switch to the current route step, as this will simplify our logic, provide consistency across platforms and languages, and cover the vast majority of way name use cases.

The remaining issues that you've brought up can be addressed as tail work in concert with the API team.

1ec5 commented 7 years ago

Having the road name be an annotation would be nice, but it would also severely bloat the response size to have the same road name duplicated once per segment along the step.

simplify our logic, provide consistency across platforms and languages, and cover the vast majority of way name use cases

Hiding the current road name label on freeways would take care of this, wouldn’t it? It would also avoid the pitfalls of displaying a misleading road name, which would be a regression compared to the current behavior. If you’re concerned that we’d display no route number while on a highway, consider that the map SDK currently displays too many route shields along the road: mapbox/mapbox-gl-js#5086.

The remaining issues that you've brought up can be addressed as tail work in concert with the API team.

It’d be a significant new feature, not tail work. We’ve discussed visual-only cues coming from the directions API in the past; this would be an example of a visual-only cue.

1ec5 commented 7 years ago

Using the map style to display the current way name is an elaborate hack that is buggy and prone to error.

It may sound that way at first glance, but querying the vector tiles is necessary anyways for things like displaying navigation-centric cross-street labels on the map and switching to the night style while in a tunnel (#559).

ericrwolfe commented 7 years ago

This is a hack. We can do better.

Bug: Missing street name:

Bug: Another missing street name:

Bug: Completely wrong street name:

Bug: Wrong highway name, no highway directionality, no shields on the route line:

1ec5 commented 7 years ago

Thank you for these bug reports. Can you provide some coordinates to help diagnose these issues? Regardless of how we source the current road name label, some of these bugs may be relevant to other components (especially feature querying in the map SDK), so we should get a handle on them.

In the meantime, can we stop the bleeding by hiding the current road label on freeways? Even in the last example above, I think that would be an improvement over seeing “James Lick Fwy”.

akitchen commented 6 years ago

Closing this as the plan is to deliver a solution as a part of https://github.com/mapbox/mapbox-navigation-ios/issues/1269

1ec5 commented 6 years ago

Following up with other ideas for improvement in #1440.