title: Google Maps: Get click or marker (x,y) pixel coordinates inside marker click listener
body: <p>I am trying to display <strong><em>completely</em></strong> custom info windows over map markers on <strong>marker click</strong>. I have successfully implemented <a href="https://stackoverflow.com/questions/18933367/gmaps-v3-infowindow-disable-the-close-x-button">this answer</a> to get a div to show over a map-canvas click... but I am not able to replicate it on a marker click. </p>
  
  <p>Is it possible to get the markers pixel position inside of the marker click function, and suppress the normal infowindow to show the desired custom infowindow?</p>
  
  <p>I tried this:</p>
  
  <pre><code>      google.maps.event.addListener(marker, 'click', function(args) {
          var x=args.pixel.x+$('#map').offset().left; //we clicked here
          var y=args.pixel.y;
  
          info.style.left=x+'px';
          info.style.top=y+'px';
          info.style.display='block';
        });
  </code></pre>
  
  <p>but in the console, I see:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'x' of undefined
  </code></pre>