mapbox / mapbox/mapbox-maps-ios
ViewAnnotation culling behavior customization
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
## New Feature
I am noticing that marker components utilizing ViewAnnotation disappear when at the edge of the screen, obviously for performance reasons. However, I'm noticing markers are un-rendering when not fully offscreen, which creates a jarring and not so fluid look. I understand that PointAnnotations or SymbolLayers resolve this issue, but given some of the interactive features I need and the complex styling, I need to use ViewAnnotations.
Is there a way to ensure the marker is fully offscreen before un-rendering? My understanding is there's some internal logic that examines the viewport in order to determine if a marker should be visible. I'm hoping I can somehow configure it so that there is extra padding to the viewport, i.e. the marker does not render until it is 100px off-screen for instance.
If this is not already a feature I missed, adding this would be great.
Thanks for the help!
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
Start by tracing the ViewAnnotation viewport-culling entry point and how visibility is decided near screen edges. Determine where configurable viewport padding could be exposed, then verify that annotations remain rendered until they pass the requested off-screen margin. Done means the behavior is configurable and covered for partially visible markers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100