PinClusterer
PinClusterer copied to clipboard
How to change icon for single pin
Changing zoom level, when I have only single pushpins and not a cluster, how do I change the icon to represent a single point? From the circle to a custom image basically
Can you add an example about how to modify/set the pushpin settings?
Cheers
You could do that when initialising PinClusterer, using the onClusterToMap
callback (and checking that the cluster contains 1 pin).
E.g.
var pinClusterer = new PinClusterer(map, { onClusterToMap: function (center, cluster) { if (cluster.length === 1) { center.setOptions({ icon: '/path/to/icon' }); } } });