mapbox / mapbox/mapbox-maps-android
Polygon breaks when zooming in
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: Android 11
- Devices affected: Samsung S10+
- Maps SDK Version: 9.7.0, "com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0", **Reproduced in v10 as well.**
Reproduced on Emulator Pixel 4 API 29 as well.
## Observed behavior and steps to reproduce
Add a hexagon with the following points, using the **Plugin Annotation**:
`[[35.52482636074315,24.014679947948405],[35.51114716956354,24.01391178034676],[35.50374631403231,24.02820018964633],[35.51002341064811,24.043258382501087],[35.52370239640629,24.044030629840638],[35.53110449138368,24.02974060478422]]`
This point is on Greece (but it doesn't matter you can add any hexagon you like). When zooming up to a certain point (<13 based on `mapboxMap.cameraPosition.zoom`) everything is OK. **As soon as you zoom >=13 the polygon breaks.** If you zoom back to <13 it is OK etc etc. I have attached these two screenshots to understand the difference:
**Correct Polygon:**

**Broken Polygon:**

## Expected behavior
The polygon should keep its format. The bounding points haven't changed at all.
## Notes / preliminary analysis
Same thing happens with bigger polygons as well, after a certain zoom level they break.
## Additional links and references
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
Reproduce the issue with the supplied hexagon points using the Plugin Annotation and vary mapboxMap.cameraPosition.zoom around 13. Trace the polygon rendering path for the annotation plugin and compare behavior below and at zoom 13; done means the polygon keeps the same shape while zooming.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- computer-graphics, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100