mapbox / mapbox/mapbox-maps-android

Multiple PointAnnotationManagers with clustering interfere with each other.

Open
#2,209 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :beetle: v11
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.