I'm trying to make POI's InfoWindow
close when click a link.
I overrided the setContent of InfoWindow like this:
//override the built-in setContent-method
google.maps.InfoWindow.prototype.setContent = function (content) {
content = content.innerHTML + '<br/> <a href="#" onclick="onSavePlace();">Save place</a>';
//run the original setContent-method
fx.apply(this, arguments);
};
Note: I didn't create any InfoWindow
object to reference to use close()
method.