title: Google Maps MarkerClusterer either doesn't work or hides all markers
body: <p>...depending on where I put the line</p>
  
  <pre><code>var mc = new markerclusterer(map);
  </code></pre>
  
  <p>If it goes where the examples seem to suggest - right after "var map" is introduced - all the markers disappear (example running <a href="https://c9.io/lmmx/molmachmap/workspace/mappage.1.html" rel="nofollow noreferrer">here</a>).</p>
  
  <p>A version without the mc variable runs with all markers visible.</p>
  
  <p>When the mc variable is introduced after the google.maps.event.addListener function as shown <a href="https://c9.io/lmmx/molmachmap/workspace/mappage.2.html" rel="nofollow noreferrer">here</a>, it seems also to cancel its effect and markers are shown.</p>
  
  <p>The locations variable is an array containing geolocation data and ready-formatted HTML (produced in a spreadsheet) for all points on the map, which is passed to the markers to place them.</p>
  
  <p>I think the issue may be that to be used with the markerclusterer the array is referring to the geolocation data, when it should refer to markers? I've seen other people using a variable markerarray, but I'm worried if I mess with it I'll break the html and geolocation extraction part of the code.</p>
  
  <p>Can anyone help explain why var mc is failing? I've loaded <a href="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer.js" rel="nofollow noreferrer">http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer.js</a> in the header, so it should work and I can't see any syntax errors in my code.</p>
  
  <p>This is the first thing I've made with JS and it's great but I just want to finish it off with the marker clusters now ! Help would be much appreciated.</p>
  
  <p><strong>EDIT:</strong> I also tried playing with <a href="https://stackoverflow.com/questions/9156909/map-markers-is-undefined-google-map-api-v3">this</a> but like I say the array here is two-fold to my understanding, so I couldn't get it to work:</p>
  
  <p><em>The suggestion:</em></p>
  
  <pre><code>...
  var infowindow = new google.maps.InfoWindow();
  
  var marker, i;
  map.markers = []; // ADD THIS LINE
  for (i = 0; i &lt; locations.length; i++) {  
      marker = new google.maps.Marker({
          position: new google.maps.LatLng(locations[i][1], locations[i][2]),
          map: map
      });
      map.markers.push(marker); // ADD THIS LINE
  ...
  </code></pre>
  
  <p><em>Snippet of my code:</em></p>
  
  <pre><code>...
  var infowindow = new google.maps.InfoWindow();
  
      var marker, i;
  
      for (i = 0; i &lt; locations.length; i++) {
        marker = new google.maps.Marker({
          position: new google.maps.LatLng(locations[i][1], locations[i][2]),
          map: map
        });
  ...
  </code></pre>