Search code examples
androidkotlinhuawei-mobile-servicesappgalleryhuawei-map-kit

Huawei Map Kit, is there a way to define an onClick event on a marker cluster?


I am creating an app for AppGallery using Huawei Map Kit. Map kit doesn't have a cluster manager, as Gmaps. You can only make markers clusterable, but there doesn't seem to be any way of handling that clustering, especially the onClick event.

Does anyone know a way that I can menage the on cluster click event? As of now, clicking on a cluster of markers procs a random marker click event.


Solution

  • You may can refer this library:https://github.com/billtom20/3rd-maps-utils

    CustomMarkerClusteringDemoActivity -> public boolean onClusterClick(Cluster cluster)