mapbox-maps-android
mapbox-maps-android copied to clipboard
Multiple PointAnnotationManagers with clustering interfere with each other.
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.
This might be caused by the fact that AnnotationManagerImpl generates non unique cluster layer ids.
Hey! Could this also cause the issue I am having where if I have multiple PointAnnotationManagers, I cannot have unique PointAnnotationListeners?
I also have this problem... I want to use two PointAnnotationManager with two clusters...