I am trying to display completely custom info windows over map markers on marker click. I have successfully implemented this answe
Here is how you get the pixel location:
function getPixelLocation(currentLatLng) {
var scale = Math.pow(2, map.getZoom());
// The NorthWest corner of the current viewport corresponds
// to the upper left corner of the map.
// The script translates the coordinates of the map's center point
// to screen coordinates. Then it subtracts the coordinates of the
// coordinates of the map's upper left corner to translate the
// currentLatLng location into pixel values in the element that hosts the map.
var nw = new google.maps.LatLng(
map.getBounds().getNorthEast().lat(),
map.getBounds().getSouthWest().lng()
);
// Convert the nw location from geo-coordinates to screen coordinates
var worldCoordinateNW = map.getProjection().fromLatLngToPoint(nw);
// Convert the location that was clicked to screen coordinates also
var worldCoordinate = map.getProjection().fromLatLngToPoint(currentLatLng);
var currentLocation = new google.maps.Point(
Math.floor((worldCoordinate.x - worldCoordinateNW.x) * scale),
Math.floor((worldCoordinate.y - worldCoordinateNW.y) * scale)
);
console.log(currentLocation);
return currentLocation;
}