Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn banner truncates road names #214

Closed
1ec5 opened this issue May 9, 2017 · 0 comments
Closed

Turn banner truncates road names #214

1ec5 opened this issue May 9, 2017 · 0 comments
Assignees

Comments

@1ec5
Copy link
Contributor

1ec5 commented May 9, 2017

Long road names or road names that include long words easily overflow the turn banner, which can only accommodate two lines of text. We should set the UILabel to max out at two lines and start shrinking to fit for anything that doesn’t fit on two lines. We should also progressively abbreviate long labels.

The current road name label added in #155 pulls the road name from Mapbox Streets vector tiles, which abbreviates common English words like “North” and “Street”. Abbreviating the road name in the turn banner will improve consistency with this label.

This Swift 2.3 file extends String with a method that returns an abbreviation that helps the string fit better given a width and font.

The list of abbreviations should be localizable. Localizers may have to take care not to abbreviate words that would be abbreviated differently in other languages.

/cc @bsudekum @cammace

wishtrip-dev pushed a commit to wishtrip-dev/mapbox-navigation-ios that referenced this issue Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants