You can only pass one element in the styles option, like this
var options = { maxZoom: 15, styles:[{ url: 'https://googlemaps.imtqy.com/js-marker-clusterer/images/m1.png', width: 53, height: 53, textColor: '#fff', }] }; var mc = new MarkerClusterer(map, markers, options);
but in this case you will have one img for all cluster sizes (1-10-100). It is better to go through 5 elements. One for each cluster size, but this is too many lines of code (I have 3 clusters on the map).
So for me it works
var mc = new MarkerClusterer(map, [], { imagePath: 'https://googlemaps.imtqy.com/js-marker-clusterer/images/m', maxZoom: 15 }); mc.setStyles(mc.getStyles().map(function (style) { style.textColor = '#fff'; return style; })); mc.addMarkers(markers)
source share