views:

19

answers:

1

I want to display googlemap location details in a info window and a button inside the infowindow, so that after clicking that button, a new QMainwindow will display.

At this point of time I am only able to show the default infowindow with close button.

Is it possible to add a clickable event inside the infowindow.

A: 

You can set the content of an InfoWindow to be a DOM Node.

For example, something like this:

var infoWindow = new google.maps.InfoWindow();
var content = document.createElement('button');

google.maps.event.addDomListener(content, 'click', function() {
  // open QMainwindow
});

infoWindow.open(map);
broady
sorry, I didn't get you. I tried a bit, but failed. Please mention little bit more on this.
RajeevSahu