Search code examples
javascriptcssgoogle-mapsgoogle-maps-api-3markerclusterer

How to change font color of google maps marker clusterer


Could anybody please tell me how to change the font color of a markerclusterer marker. This is my current code for styling the marker

mcOptions = {styles: [{
                height: 27,
                url: "image.png",
                width: 35
                }],
                maxZoom: 8
                }

var markerCluster = new MarkerClusterer(map, markers, mcOptions);

Solution

  • You can check this Documentation for Marker Clusterer under class ClusterIconStyle

    There is an option named textColor which sets the color of the label text shown on the cluster icon.