title: google.maps.event.addListener is not a function
body: <p>I've been trying to add infowindows to my markers and I'm stuck since the avaible SO answers are pretty old. I have this code that corresponds to <a href="https://stackoverflow.com/questions/11106671/google-maps-api-multiple-markers-with-infowindows">this</a> answer in SO:</p>
  
  <pre><code>var map_center = new google.maps.LatLng(-0.179041, -78.499211);
          var map = new google.maps.Map(document.getElementById('mapa_ciudad'),
                  mapOptions);
  
          marker_objects = [];
  
          for (i = 0; i &lt; markers.length; i++){
              marker = new google.maps.Marker({
                 position: new google.maps.LatLng(markers[i][1], markers[i][2]),
                 map : map,
                 title: markers[i][0]
              });
  
              var infowindow = new google.maps.InfoWindow();
  
              google.maps.event.addListener(marker, "click", function(marker){   
      // !!! PROBLEM HERE
                  return function(){
                      var content = [marker.title];
                      infowindow.setContent(content);
                      infowindow.open(map, marker);
                  }
              })(marker);
  
              marker_objects.push(marker);
          }
  
          function AutoCenter(){
              var bounds = new google.maps.LatLngBounds();
              $.each(marker_objects, function(index, marker){
                 bounds.extend(marker.position)
              });
              map.fitBounds(bounds);
          }
  
          AutoCenter();
  </code></pre>
  
  <p>I get the error <code>TypeError: google.maps.event.addListener(...) is not a function</code></p>