mapbox / mapbox/mapbox-maps-android
Symbol layer with polygon source results in jumping / multiplying icons
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 578
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- Android OS version: 12
- Devices affected: emulator, actual phone (e.g. Pixel 6)
- Maps SDK Version: 10.3.0
## Observed behavior and steps to reproduce
Hey folks, I'm working with a symbol layer which I style with an image. I'm connecting it to a geojson source with polygon features. When zooming in and out I get unexpected behavior from the icons: sometimes the icons jump between zoom levels, sometimes I get icons multiplying. See the videos attached below.
The polygons I feed into the symbol layer's source are the field polygons you can see in the videos below - I have additional layers for the polygons/fills.
(The label rendering issues are due to https://github.com/mapbox/mapbox-maps-android/issues/1197 please disregard in the context of this ticket)
## Expected behavior
I expected one icon per polygon, in the center/centroid of the polygon.
More importantly I expected icons to stay in place when changing zoom levels, and not multiplying.
## Notes / preliminary analysis
See #1197 for the symbol layer definition, I do not have any zoom-level dependent styling set up other than min and max zoom.
## Additional links and references
Here are two screen recordings showing the issue. The first one shows the icons jumping between zoom levels, the second one shows how the icons seem to multiply when zooming in all the way.
https://user-images.githubusercontent.com/527241/156408716-79eab345-ded5-4efd-aa3a-5a447442f404.mp4
https://user-images.githubusercontent.com/527241/156411708-94a0cbfd-56ab-4bc5-bfbd-d3697bd55e55.mp4
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 reproducing the issue on Android 12 with Maps SDK 10.3.0 using a polygon GeoJSON source and image-styled symbol layer, then compare icon placement while zooming. Review the symbol layer definition referenced in #1197 and the attached recordings. Done means one icon appears per polygon at its center and remains stable without multiplying across zoom levels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100