Skip to content

Instantly share code, notes, and snippets.

@Auronmatrix
Created February 23, 2017 10:49
Show Gist options
  • Save Auronmatrix/ad3416e48592e42bc46e9a6bda71af15 to your computer and use it in GitHub Desktop.
Save Auronmatrix/ad3416e48592e42bc46e9a6bda71af15 to your computer and use it in GitHub Desktop.
// Add function to set required google event parameters
stopPropagation : function (e){
if(!e){
e=window.event;
}
e.cancelBubble=true;
if(e.stopPropagation){
e.stopPropagation();
}
}
and then just call it with the click method already being passed into the RichMarker click event
google.maps.event.addListener(marker, 'click', function (e) {
// ...
stopPropagation(e);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment