mapbox / mapbox/mapbox-maps-android
Multiple PointAnnotationManagers with clustering interfere with each other.
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: 10
- Devices affected: DJI RC Pro
- Maps SDK Version: 11.0.0-beta.5
Observed behavior and steps to reproduce
labelAnnotations: PointAnnotationManager =
annotations.createPointAnnotationManager(AnnotationConfig(layerId = labelAnnotationLayerId,
annotationSourceOptions = AnnotationSourceOptions(clusterOptions = ClusterOptions(
clusterRadius = 20,
circleRadius = 0.0,
textSize = 0.0,
clusterMaxZoom = 100))))
pointAnnotations: PointAnnotationManager =
annotations.createPointAnnotationManager(AnnotationConfig(layerId = pointAnnotationLayerId,
annotationSourceOptions = AnnotationSourceOptions(clusterOptions = ClusterOptions(
clusterRadius = 20,
circleRadius = 12.0,
clusterMaxZoom = 16))))
In the above code, both annotation managers seem to share the same clusterer. Point annotations are clustered between managers and I think the settings come from the first created annotation manager.
Expected behavior
Both annotations managers cluster annotations separately with their respective configurations.
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 from the two createPointAnnotationManager calls and their AnnotationConfig and ClusterOptions settings in the reproduction. Trace how managers create or share their clusterers, then verify whether separate managers retain separate clustering configurations. Done means annotations from each manager cluster independently with their respective clusterRadius, circleRadius, textSize, and clusterMaxZoom values on the reported Android setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100