the content for an infoWindow
may also be a DOMNode
.
Create a DOMNode
and insert the button into this node, then you'll be able to apply a click-listener to the button(and pass any type of argument):
function showTB(event) {
var contentElement = document.createElement('div'),
btn = document.createElement('button');
contentElement.appendChild(document.createTextNode(event.latLng));
contentElement.appendChild(document.createElement('br'));
contentElement.appendChild(btn);
btn.appendChild(document.createTextNode('More'));
google.maps.event.addDomListener(btn,'click',function(){ moreInfo(event);})
infoWindow.setContent(contentElement);
}