I want to know how to trigger an event when I click on an infoWindow using Google Maps API v3. In this example, when I click on a marker, an info window shows up with a uni
Thanks for all your comments. I manage to build (after reading your suggestions) an example that works without modifying the Infowindow code.
The infoWindow itself should only contain a placeholder div with a unique id:
{
this.onInfoWindowOpen(this.props, e);
}}
>
And inside the Mapcontainer, you define an onInfoWindowOpen callback, that inserts a single component/container with the onClick event and render it to a placeholder div:
onInfoWindowOpen = () => {
const button = ();
ReactDOM.render(React.Children.only(button),document.getElementById("xyz"));
}
Here is a working example:
One more complete example MAP, Marker and InfoWindow: