title: how to customize style of individual marker cluster in google maps api
body: <p>I am using JSON data to plot hundreds of markers using google maps api v3.I have used <a href="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/docs/examples.html" rel="nofollow noreferrer">Markerclusterer</a> and it is working fine.It seems that the Markerclusterer assigns cluster icons on the basis of different zoom levels by default. What i want to do is to customise individual style of the cluster on the basis of an if condition on data obtained by the json array.
  I have tried the following logic but it changes the style of all the clusters, rather a specific one containing a specific marker.</p>
  
  <pre><code>    if(redflag)
                      {
                        var mcOptions = {
                                  gridSize: 50,
                                  maxZoom: 15,
                                  styles: [{
                                      height: 57,
                                      url: "../../css/images/m3.png",
                                      width: 57
                                  }     
                                  ]
                              };
                      }
                  else
                      {
                       mcOptions = {
                              gridSize: 50,
                              maxZoom: 15,
                              styles: [{
                                  height: 53,
                                  url: "../../css/images/m1.png",
                                  width: 53
                              }]
                          };
                      }
                   var mc = new MarkerClusterer(map, [], mcOptions);
                   mc.addMarkers(markerArray , true);
  </code></pre>
  
  <p>How to customize individual clusters using my own condition and not the default indexing by the markerclusterer object.</p>
  
  <p>Edit 1:
  I have modified the code in order to trace the marker using marker_ and getClusters() method and have succeeded in changing the cluster icon style but the clusters gets out of bond and doesnot show proper icon change on zoom in zoom out. I have used help of this link <a href="https://stackoverflow.com/questions/18452205/animate-cluster-of-markerclusterer">animate cluster marker</a>.</p>
  
  <pre><code> var mc = new MarkerClusterer(map, [], mcOptions);
                   mc.addMarkers(markerArray , true);
   //attach listener to clusteringend-event
                   google.maps.event.addListener(mc,'clusteringend',function()             {
  
                   //iterate over all clusters
                   var clusters=this.getClusters();
  
                   for(var i = 0; i &lt; clusters.length;++i)
                   {
  
                   if(clusters[i].markers_.length &gt; 1)
                   {
  
  
                      var markers= clusters[i].markers_;
  
                      var flag=false;
                      for(var j=0;j&lt;markers.length;++j)
                          {
  
                              if(markers[j].getAnimation()!= null)
                                  {
                                  alert("marker posotion"+markers[j].getPosition().toString());
                                  flag=true;
                                  }
                          }
  
  
                      if(flag)     
                         clusters[i].clusterIcon_.div_.firstChild.src='../../css/images/m3.png';
  
                     }
                   }
                   });
  </code></pre>