mapbox / mapbox/mapbox-maps-flutter
Round polygon has too few vertices with certain zoom settings
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 380
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Description
Since plugin's API does not provide an easy way to create a circle with a given radius in meters, I used a circular polygon for that, as suggested [here](https://github.com/mapbox/mapbox-maps-flutter/issues/62).
If I create a circular polygon with 64 vertices, most of the times it looks good, smooth, but sometimes, when I play with the zoom, the polygon gets rendered with less vertices than it should (usually 16 or 8), which is noticeable. Seems like it's some kind of a Mapbox rendering optimization. Can this be turned off or fixed somehow?
Increasing vertices count does not help. I also tried drawing a line (polyline) around the circle, but it has the same issue.
Video:
https://github.com/mapbox/mapbox-maps-flutter/assets/55327556/96b27fee-d4ac-4329-94f3-e94e7a532c22
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 circular polygon and polyline behavior while changing zoom settings, using the linked video as the expected symptom. Investigate the Mapbox rendering path involved in zoom-dependent vertex reduction; done means the shape remains visibly smooth at the reported zoom levels or the limitation and workaround are clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100