Wednesday, July 17, 2024
HomeiOS Developmentios - How the get an applicable icon for MKRoute.Step?

ios – How the get an applicable icon for MKRoute.Step?


Within the native Apple Maps app, each route step has a pleasant icon displaying the motion to take. For roundabouts, the icon even accurately reveals the roundabout form, all of the exits, and the exit to take:

enter image description here

Be aware that Apple Maps accurately renders roundabout icons in left-hand visitors nations (UK, Thailand, and so forth.) as clockwise, whereas it renders them counter-clockwise in right-hand visitors nations.

How can I get these icons to indicate in my app? The directions property of MKRoute.Step is only a String. In actual fact, it’s a localized string, so it’s unimaginable to parse it algorithmically:

The framework localizes the string on this property in response to the person’s language preferences.

I don’t see some other appropriate property that may be accessed to find out the right icon to indicate. Does Apple use some secret personal API for this?

Any concepts or ideas or workarounds?



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments