comaps/comaps
42
1.9k
Fork
You've already forked comaps
161

[iOS] Draw road shields in direction description #4710

Merged
pastk merged 2 commits from matheusgomesms-road-shields into main 2026年07月13日 14:16:52 +02:00

Description

Feature parity (#4619). Has to be merged after #4619 (if want to test locally, please get that PR first).

Heavily AI-assisted, but I improved and heavily tested it. Didn't test in a real device, though (I want to have #4619 merged first to have a cleaner build).

Please see attached images! In the cases of Brazil or US Interstate, it falls back to a generic pill. Neither this PR or the other one draws the specific shield, but can be done on a future PR (out of scope).

Just wanted to reduce feature parity, and looks nice IMO!

CC @eisa01 @LMBishop

Signed-off-by: matheusgomesms matheusgomesms@noreply.codeberg.org

Submitter checklist

  • All code changes and commit messages conform to the appropriate style guide
  • I have signed off all my commits with the Developers Certificate of Origin
  • All communication (commit messages, pull request messages, documentation, and code comments) is human written and not authored by AI
  • I take full responsibility of all changes submitted in this pull request
### Description Feature parity (#4619). Has to be merged after #4619 (if want to test locally, please get that PR first). Heavily AI-assisted, but I improved and heavily tested it. Didn't test in a real device, though (I want to have #4619 merged first to have a cleaner build). Please see attached images! In the cases of Brazil or US Interstate, it falls back to a generic pill. Neither this PR or the other one draws the specific shield, but can be done on a future PR (out of scope). Just wanted to reduce feature parity, and looks nice IMO! CC @eisa01 @LMBishop Signed-off-by: matheusgomesms <matheusgomesms@noreply.codeberg.org> ### Submitter checklist - [x] All code changes and commit messages conform to the appropriate [style guide](https://codeberg.org/comaps/comaps/src/branch/main/docs/CONTRIBUTING.md#code-contributions) - [x] I have signed off all my commits with the [Developers Certificate of Origin](https://codeberg.org/comaps/Governance/src/branch/main/DCO.md) - [x] All communication (commit messages, pull request messages, documentation, and code comments) is human written and not authored by AI - [x] I take full responsibility of all changes submitted in this pull request
[iOS] Draw road shields in direction description
All checks were successful
DCO / check (pull_request) Successful in 5s
Android Check / Android Lint (pull_request) Successful in 22m34s
Android Check / Build Android Debug (pull_request) Successful in 32m23s
Linux Check / Linux no unity build (pull_request) Successful in 33m33s
Linux Check / Linux builds and tests (pull_request) Successful in 34m12s
8033e69bb4
Signed-off-by: matheusgomesms <matheusgomesms@noreply.codeberg.org>
Owner
Copy link

The idea with #4619 is to put it through a test build first, before merging.
We can have both PRs in the next test build.

The idea with https://codeberg.org/comaps/comaps/pulls/4619 is to put it through a test build first, before merging. We can have both PRs in the next test build.
@ -1107,6 +1107,20 @@ std::vector<std::string> GetRoadShieldsNames(FeatureType & ft)
return names;
}
std::string GetRoadShieldDisplayText(RoadShield const & shield)
Member
Copy link

I'm not sure if this is the best place for this logic. I would rather this text be conveyed in the RoadShield object (with a field like m_displayText), which the individual parser classes populate.

Also, in the Android implementation, m_additionalText is placed outside the shield, since it's used for text which is not in the shield. E.g. in US Interstate road shields, the direction of the road (East/West) is outside of the shield, so those cardinal directions end up in the m_additionalText field.

I'm not sure if this is the best place for this logic. I would rather this text be conveyed in the RoadShield object (with a field like `m_displayText`), which the individual parser classes populate. Also, in the Android implementation, `m_additionalText` is placed outside the shield, since it's used for text which is not in the shield. E.g. in US Interstate road shields, the direction of the road (East/West) is outside of the shield, so those cardinal directions end up in the `m_additionalText` field.
Member
Copy link

When I eventually add this to CarPlay I will add it as an AttributedInstructionVariants with an attachment for the shield

https://developer.apple.com/documentation/carplay/cpmaneuver/attributedinstructionvariants

When I eventually add this to CarPlay I will add it as an AttributedInstructionVariants with an attachment for the shield https://developer.apple.com/documentation/carplay/cpmaneuver/attributedinstructionvariants
Author
Member
Copy link

Thanks! Fixed that, can you please check again, @LMBishop?

Thanks! Fixed that, can you please check again, @LMBishop?
LMBishop marked this conversation as resolved
[iOS] Draw road shields in direction description
Some checks failed
DCO / check (pull_request) Successful in 6s
Linux Check / Linux no unity build (pull_request) Successful in 25m48s
Android Check / Android Lint (pull_request) Successful in 25m58s
Android Check / Build Android Debug (pull_request) Successful in 25m57s
Linux Check / Linux builds and tests (pull_request) Failing after 25m32s
da1843bc74
Signed-off-by: matheusgomesms <matheusgomesms@noreply.codeberg.org>
Owner
Copy link

As per #4619 (comment) it had been battle-tested and there were no UX complaints with Android counterpart, so good to merge!

And if small fixes are needed then follow-up 🙏

As per https://codeberg.org/comaps/comaps/pulls/4619#issuecomment-19125344 it had been battle-tested and there were no UX complaints with Android counterpart, so good to merge! And if small fixes are needed then follow-up 🙏
pastk deleted branch matheusgomesms-road-shields 2026年07月13日 14:16:53 +02:00
Owner
Copy link

Will it work in CarPlay too?

Will it work in CarPlay too?
Member
Copy link

Not yet, maybe I fix it soon as the "ref" that we use to show it is compounded with the network key... E.g., IT:VI/SP246 instead of SP246

@matheusgomesms this will now always show a shield for the ref? Falling back to the generic white one?

Not yet, maybe I fix it soon as the "ref" that we use to show it is compounded with the network key... E.g., IT:VI/SP246 instead of SP246 @matheusgomesms this will now always show a shield for the ref? Falling back to the generic white one?
Author
Member
Copy link

@eisa01 Yep, it shows whatever is set for that country, or the default one.

@eisa01 Yep, it shows whatever is set for that country, or the default one.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
accessibility
Visual contrast, screen readers, etc.
addresses
Related to addresses, post codes, city/town/village borders
AI-assisted
AI-assisted PRs or issues
Android
Android app
Android Auto
Android Auto integration
Android Automotive
Android Automotive app
api
Deeplinks and URLs handled by the API
app stores
Google Play, App Store, F-Droid, Obtanium, Huawei Gallery, Acressent, Flathub, IzzyOnDroid, etc.
battery & performance
Performance and battery consumption-related problems and optimisations
borders
Related to borders between countries / regions
bug
Something is not working
build
building of apps
CarPlay
CarPlay integration
community
Community relations
contribution welcome
Contributions are very welcome, get started here
core
C++ core of the app
crash
Crash reporting
cycling
Specific to using a bicycle or similar vehicles
desktop
Qt desktop app incl. designer
devops
directions
Voice and visual turn-by-turn directions
docs
Documentation
downloader
Map downloader
drape
The C++ map rendering engine
driving
Specific to driving a car or similar vehicles
duplicate
This issue or pull request already exists
editor
Built-in OSM editor
elevation
Contour lines, elevation profiles, ...
enhancement
New feature
EPIC
A big idea or a piece of work that requires a lot of effort to implement
F-Droid
F-Droid platform
favorites
Places and GPS tracks
feature parity
A feature is implemented on one platform, but not on another
fonts
Fonts
good first issue
Interested in contributing? Get started here
help wanted
Need some help
icons
Map features icons
invalid
Something is wrong
iOS
iOS app
legal
Legal aspects
linux phone
LibreM, PinePhone and other mobile linuxes
location
Via GPS, network, etc.
macOS
Emulated iOS App or Qt Desktop App specifically related to macOS
map data
Related to OpenStreetMap data
mapgen needed
map generation is needed for PR to take full effect
maps compat
compatibility of newer maps with older apps; issues and PRs breaking or fixing compatibility
maps generator
Maps generator
navigation
The navigation turn-by-turn app mode
need feedback
Further information is requested
needs design
not planned
This is not planned at the moment
OM
Related to or references Organic Maps
opening hours
Related to Business Hours, off time, holidays, seasonal
outdoor
Hiking, backcountry cycling, 4WD, etc.
POI info
Various feature attributes usually displayed on the place page
priority
High
Seriously affects a lot of users or breaks the app severely
priority
Low
Not urgent or only happens in rare cases
priority
Medium
Happens enough to be a concern, but not app-breaking
privacy
Privacy aspects
public feedback needed
Experimental changes which requite explicit public feedback before continuing with them
public transport
Specific to public transport (busses, trams, subways, trains etc.)
question
Questions and Discussions
raw idea
Needs more discussion or to be further elaborated
refactoring
Improving the structure or simplifying the code, improving maintainability
regional
Different depending on the country or region
regression
Regression in the app
releases
Release management
route planning
Preview and plan your route
routing
Routing engine
search
Search inside of the app
security
Security improvements
source data
Related to OSM, SRTM, Tiger etc.
styles
Map styling, incl. mapping OSM tags
subway
The special subway layer
task
Internal things that have a clear way for implementation
tests
Unit tests
track recording
Track recording
traffic
Traffic information (still under development)
translations
Translations and all other kinds of localisation
TTS
Text-to-Speech
UI
User interface
UX
User experience
wait for upstream
Waiting for something to be done upstream
walking
Specific to walking
Wikipedia
Related to the embedded Wikipedia articles
Windows
Windows related
world map
The world overview map
No labels
accessibility
addresses
AI-assisted
Android
Android Auto
Android Automotive
api
app stores
battery & performance
borders
bug
build
CarPlay
community
contribution welcome
core
crash
cycling
desktop
devops
directions
docs
downloader
drape
driving
duplicate
editor
elevation
enhancement
EPIC
F-Droid
favorites
feature parity
fonts
good first issue
help wanted
icons
invalid
iOS
legal
linux phone
location
macOS
map data
mapgen needed
maps compat
maps generator
navigation
need feedback
needs design
not planned
OM
opening hours
outdoor
POI info
priority
High
priority
Low
priority
Medium
privacy
public feedback needed
public transport
question
raw idea
refactoring
regional
regression
releases
route planning
routing
search
security
source data
styles
subway
task
tests
track recording
traffic
translations
TTS
UI
UX
wait for upstream
walking
Wikipedia
Windows
world map
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
comaps/comaps!4710
Reference in a new issue
comaps/comaps
No description provided.
Delete branch "matheusgomesms-road-shields"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?