Open GoogleCodeExporter opened 8 years ago
I'm having same issue, seems the function InfoBubble.prototype.addEvents_ is
canceling all events. If i temporarily remove the 'click' from the event array
in th e function, then my click event works. This function should be modified
to be remove events a little more intelligently.
[code]
/**
* Add events to stop propagation
* @private
*/
InfoBubble.prototype.addEvents_ = function() {
// We want to cancel all the events so they do not go to the map
var events = ['mousedown', 'mousemove', 'mouseover', 'mouseout', 'mouseup',
'mousewheel', 'DOMMouseScroll', 'touchstart', 'touchend', 'touchmove',
'dblclick', 'contextmenu', 'click'];
var bubble = this.bubble_;
this.listeners_ = [];
for (var i = 0, event; event = events[i]; i++) {
this.listeners_.push(
google.maps.event.addDomListener(bubble, event, function(e) {
e.cancelBubble = true;
if (e.stopPropagation) {
e.stopPropagation();
}
})
);
}
};
[/code]
Original comment by da...@meshnet.ca
on 25 Jul 2011 at 12:59
Note that the implementation should be where you disable the regular map
functions (the drag/double click zoom, etc) don't work, but the custom binds
still do work (the coder who is binding the click/whatever).
Original comment by *...@wepay.com
on 25 Jul 2011 at 4:40
Original issue reported on code.google.com by
krom...@gmail.com
on 25 Jul 2011 at 6:34