title: Multiple Marker InfoWindows in Javascript
body: <p>I'm quite a noob when it comes to Javascript, but I'm trying out something for my website/school project.</p>
  
  <p>On a map I want to display 2 locations, with each a marker and an informationwindow of there own. 1 shows my location + contact details, the second marker should display other details for a company.</p>
  
  <p>I've managed to get 2 markers in the map to display at the place I want to, but the next problem is giving each marker it's own InfoWindow.</p>
  
  <p>var Rafael = new google.maps.LatLng(52.341949,6.682236);
      var Aandagt = new google.maps.LatLng(52.341949,6.782236);</p>
  
  <pre><code>var myOptions = {
      zoom: 10,
      center: new google.maps.LatLng(52.341949,6.682236),
      streetViewControl: false,
      zoomControl: false,
      panControl: false,
      scaleControl: false,
      overviewMapControl: false,
      mapTypeControl: false,
      mapTypeId: google.maps.MapTypeId.TERRAIN
  };
  
  var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  
  var marker = new google.maps.Marker({
      position: Rafael,
      map: map,
      title:"Rafael"
  }); 
  
  var marker = new google.maps.Marker({
      position: Aandagt,
      map: map,
      title:"Aandagt"
  }); 
  
  var infowindow = new google.maps.InfoWindow({
      content: '&lt;h9&gt;&lt;a href="http://www.aandagt.nl"&gt;AANDAGT Reclame &amp; Marketing&lt;/a&gt;&lt;/h9&gt;&lt;h10&gt;&lt;br /&gt;&lt;br /&gt;Einsteinstraat 8b&lt;br /&gt;7601 PR Almelo&lt;br /&gt;&lt;br /&gt;Telefoon (0546) 85 03 69&lt;br /&gt;Fax (0546) 45 53 31&lt;br /&gt;&lt;br /&gt;&lt;a href="mailto:info@aandagt.nl"&gt;info@aandagt.nl&lt;/a&gt;&lt;/h10&gt;'
  })
  
  
  google.maps.event.addListener(marker, 'mouseover', function() {
    infowindow.open(map,marker);
  });
  
  google.maps.event.addListener(marker, 'click', function() {
    infowindow.close(map,marker);
  });
  </code></pre>
  
  <p>Any help or suggestion how to add and attach 2 InfoWindows, 1 for marker 'Rafael' and 1 for marker 'Aandagt' would be much appreciated.</p>
  
  <p>To view my current map: <a href="http://www.imrafaelhi.nl/stageverslag/?page_id=266" rel="nofollow">http://www.imrafaelhi.nl/stageverslag/?page_id=266</a></p>