mapbox-maps-ios icon indicating copy to clipboard operation
mapbox-maps-ios copied to clipboard

Add cluster options to PointAnnotationManager.

Open pschan9092 opened this issue 2 years ago • 1 comments

New Feature

<- Description of the feature being requested and any outcomes desired, an example use case, and any suggestions for solution ->

-> Suggest that Cluster Option can be added and set when PointAnnotationManager is created. You want to use all the features of PointAnnotation and create a ClusterLayer for custom operation.

Why

<- 1-2 sentence description of why you're requesting this feature. What problem does it solve? Why is it valuable? ->

-> You want to implement clustering by adding Cluster Layer while using the features of PointAnnotation. However, there is no way to set Cluster Options in PointAnnotation Manager.

  • Add / Modified Files
  • ClusterOptions.swift
  • AnnotationOrchestrator.swift - makePointAnnotationManager
  • PointAnnotationManager.swift - init

Annotations.zip

pschan9092 avatar Jul 19 '22 06:07 pschan9092

Mark Anderson from @fundrise here, we'd also love this feature to come back - we were using it as well, and will need a workaround for now.

markemer avatar Aug 11 '22 14:08 markemer

Hi @pschan9092 & @markemer --

Thanks for raising this feature request. I've just merged a PR into main which adds the ability to cluster on PointAnnotationManager, which should be included in an upcoming release. If you are able to try out the new options we'd appreciate any feedback you have.

I've also added an example here demoing implementation: https://github.com/mapbox/mapbox-maps-ios/blob/main/Apps/Examples/Examples/All%20Examples/Annotations/PointAnnotationClusteringExample.swift.

pjleonard37 avatar Oct 25 '22 17:10 pjleonard37