title: Open and Close InfoWindow onclick
body: <p>Can anyone help me code inside my eventListener so that an infowindow will do the following:
      open if it's currently closed,
  and close if it's currently open.</p>
  
  <p>I've tried the following to no success...</p>
  
  <pre><code>google.maps.event.addListener(marker, 'click', function() {
  if(infowindow.closed == true){
  infowindow.open(map, marker)
  }
  else{
  infowindow.close(map, marker)
  }
  })
  </code></pre>