mapbox / mapbox/mapbox-maps-ios
Stretchable UIImage support seems to be broken
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- Maps SDK Version: v10 beta
## Observed behavior and steps to reproduce
The Nav SDK started seeing some issues with the route duration annotations being implemented here: https://github.com/mapbox/mapbox-navigation-ios/issues/2996. These issues are also seen in the simpler PR for adding a new example to the Maps SDK sample app: https://github.com/mapbox/mapbox-maps-ios/pull/190.
The issues are around the `icon-anchor` and `text-anchor` properties seeming to regress somewhere between when I first put up the sample PR and now. @nishant-karajgikar and I spent a lot of time debugging this. Our shared assumption was that the issue lay either in my use of the runtime styling expressions or in the SDK expression logic itself.
After looking at it for a while and even eliminating the use of data-driven styling, the main issues remained. We came to the conclusion that the issues are likely to be in how the SDK handles generating the GL stretchable images from the UIImage interface provided in the iOS Maps SDK.
https://github.com/mapbox/mapbox-maps-ios/pull/190 contains an animated GIF of how this should look, mainly that the annotations are clearly visually anchored properly with the tip of the annotation staying attached to the map at the same spot. If you build and try the same sample in this branch: `ac-AnnotationStylingRedux` you will see that the visual behavior is now incorrect and the anchors are not maintained properly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Build the Maps SDK sample from the `ac-AnnotationStylingRedux` branch and compare its behavior with the animated GIF in PR #190. Investigate the UIImage-to-GL stretchable image handling implicated by the issue, focusing on how `icon-anchor` and `text-anchor` are preserved; done means annotation tips remain attached to the same map position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- computer-graphics, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100