title: Multiple Marker InfoWindow in Google Maps v3
body: <p>I've testing this for about 1 hour now. But for some reason I can't make it work, to display another infowindow text for each marker.
  Clicking each of them, will open a new infowindow (the old one will be closed <em>which is good</em>), but the text inside the window is always the text I set in the last marker:</p>
  
  <pre class="lang-js prettyprint-override"><code>function initialize() {
      var center = new google.maps.LatLng(51.133333,10.416667);
      var map = new google.maps.Map(document.getElementById('map'), {
        zoom: 6,
        center: center,
        mapTypeId: google.maps.MapTypeId.ROADMAP
      });
      var markers = [];
  
      for (var i = 0, dataPhoto; dataPhoto = data.photos[i]; i++) {
        var latLng = new google.maps.LatLng(dataPhoto.latitude,
                     dataPhoto.longitude);
        var marker = new google.maps.Marker({
          position: latLng,
          title: dataPhoto.infotitle,
          map: map,
        });
  
        /* Create Info Windows */         
  
        var infowindow = new google.maps.InfoWindow({
          content: " "
        });
        google.maps.event.addListener(marker, 'click', function() {
          infowindow.setContent('&lt;h3&gt;'+marker.title+'&lt;/h3&gt;'+' Infotext');
          infowindow.open(map, this);
        });
        markers.push(marker);
      }
      var markerCluster = new MarkerClusterer(map, markers);
  } 
  </code></pre>
  
  <p>I've been seeing some solutions around here, but none of them seemed to work properly for me.
  I'd really appreciate your help!</p>
  
  <p>See <a href="http://darkskyz.de/maps/" rel="nofollow">online demo</a>.</p>