mapbox / mapbox/mapbox-maps-android
Setting maxZoom in AnnotationConfig for creating Annotation managers doesn't seem to work
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 578
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- Maps SDK Version: 10.10.3
## Observed behavior and steps to reproduce
here is my code:
`
val circleAnnotationOptions: CircleAnnotationOptions = CircleAnnotationOptions()
.withPoint(Point.fromLngLat(51.416364, 35.771880))
.withCircleRadius(8.0)
.withCircleColor("#ee4e8b")
.withCircleStrokeWidth(2.0)
.withCircleStrokeColor("#ffffff")
val circleAnnotationManager = binding.mapView.annotations.createCircleAnnotationManager(
AnnotationConfig(
annotationSourceOptions = AnnotationSourceOptions(maxZoom = 16)
))
circleAnnotationManager.create(circleAnnotationOptions)
`
## Expected behavior
By setting maxZoom, I expect the circle I have created, will not be shown before or maybe after this zoom level. But nothing really differs, and my circle is available in every zoom level.
Also, I saw this behavior in other Annotatyion managares like PolyLine.
And may I ask why can't we have minZoom Level? Is there maybe a way to restrict our annotation visibility between zoom levels, like mapbox v9?
## Notes / preliminary analysis
## 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
Start by reproducing the behavior with Maps SDK 10.10.3 using AnnotationConfig, AnnotationSourceOptions(maxZoom = 16), and createCircleAnnotationManager; compare circle and polyline annotation managers. Determine whether maxZoom is expected to control visibility and whether a minZoom equivalent is supported, then document the result or identify the required fix.
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
- Needs clarification
- Newbie friendliness
- 35/100