Search code examples
google-mapsmarkerclusterer

markerclusterer: anchor offset for cluster icons


I'm trying to slightly offset cluster icons created by the Google Maps Markerclusterer (V3). Short of modifying the existing code, I can't find a way to do this. Does anybody have an idea?

The Styles object in which you can provide a custom image URL accepts an anchor property, but this is to offset the generated marker item count.

Thanks!


Solution

  • You could add some transparent space to one side of your cluster icon's PNG, so that the part of the icon which you'd like to be centred is actually also centred in your PNG. This should not increase the weight of your image by more than a few bytes.