I have a map with markers at this time of two different types: photos and blog posts. I would like to use a clustering system, preferably MarkerClusterer. Is there a way to change the marker icon dynamically or, in other words, depending on which markers (photos or messages) are inside the cluster? For example, if the cluster consists of only photographs, I would like to display some kind of camera icon, if the cluster has only records, I could display the letter. And if all types of markers are inside the cluster, I would like to use some kind of combined icon.
Is it possible to somehow insert this check where I assign the icon url in MarkerStyleOptions?
The bonus should also display the number of markers of each type in the icon, that is, two numbers.
Does anyone see a way to do this without changing the source code?
I think the easiest option is to save each marker type in separate clusters ...
source
share