title: Google Maps Infowindow Auto Updating
body: <p>I have an app in which I need the data in the <code>infowindow</code> bubbles to update automatically. I've checked around and I see methods for moving markers, updating marker colors, and the like, but nothing with directly updating infowindow content. I am pulling the value necessary (e.g. <code>building[i][7]</code> ) from a hidden DOM element whose content automatically updates, and I need the infowindow's content to automatically update alongside it.</p>
  
  <p>Here is the code I am using to draw the <code>infowindow</code> bubbles.</p>
  
  <pre><code>infowindow=new google.maps.InfoWindow();
  for (i=0;i&lt;buildings.length;i++){
      marker=new google.maps.Marker({
          position:new google.maps.LatLng(buildings[i][4],buildings[i][5]),
          map:map,
          shadow:shadow,
          icon:greenIcon,
          title:buildings[i][0]+" \n"+buildings[i][1],
          zIndex:buildings[i][6]
      });
  }
  google.maps.event.addListener(marker,'click',(function(marker,i){
      return function(){
          infowindow.setContent(
              '&lt;h2&gt;'+buildings[i][0]+'&lt;/h2&gt;'+
              '&lt;p&gt;'+buildings[i][2]+'&lt;/p&gt;'+
              '&lt;p&gt;'+buildings[i][7]+'&lt;/p&gt;'
          );infowindow.open(map,marker);
      }
  })(marker,i));
  </code></pre>
  
  <p>Any help is greatly appreciated!</p>