We are implementing clustering on my app. Until now we were using the addMarker method to add the markers, but now with clustering it seems that we should add them by using addSource.GeoJsonSource which we give a feature collection with all the points. With this new implementation, we are having problem giving different markers different images. We would appreciate if somebody could help.
Asked
Active
Viewed 566 times
1 Answers
4
The solution to this is not necessarily to add a new source.
You can associate multiple images with a style and use a styling expression to determine which clusters use which images. As is done in this example: https://docs.mapbox.com/android/maps/examples/symbol-layer-clustering/
⚠️ Disclaimer: I currently work at Mapbox ⚠️

riastrad
- 1,624
- 10
- 22
-
How to separate some points on a layer and others on the other layer, my goal is to customize points not clusters. – Donki Mar 04 '19 at 14:44