简体   繁体   中英

Mapbox Android - How to cluster or organize markers?

I am having trouble organizing my markers. I have a bunch of them, and the problem is that there are so many markers close to each other. Making it impossible to navigate using such polluted map.

Is there a way to cluster all those markers or any other way to make it less polluted? I have made a search around Mapbox's website, and thanks to a developer, I have found a way to implement such method, but any of those can be used with markers added within the map ( mapboxMap.addMarker() )

Example: Data Clusters .

Does anyone know how to organize such markers? Thanks!

@Sem you could create a cluster of markers by using method setClusteringEnabled. I also faced same issue, this method is not supported in current mapbox sdk. I am using 4.0.

Try this Mapbox plugin . This lib has DefaultClusterRenderer.java class, you need to use it or implement ClusterRenderer.java interface, for drawing your own icons

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM