Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- google.maps.event.addListener(infowindow, "closeclick", function() {
- // The API function doesn't have the e parameter, I can't access closeclick
- });
- container.addEventListener('click', function(ev) {
- if (ev.target.src == 'https://maps.gstatic.com/mapfiles/api-3/images/mapcnt6.png') {
- return false;
- }
- // the code I want to execute only when the click event doesn't come from the InfoWindow
- });
- google.maps.event.addListener(infowindow, "closeclick", function(e) {
- e.stopPropagation();
- });
- var aListener = google.maps.event.addListener(map, 'click', function(event) {
- // Try to prevent event propagation to the map
- event.stop();
- event.cancelBubble = true;
- if (event.stopPropagation) {
- event.stopPropagation();
- }
- if (event.preventDefault) {
- event.preventDefault();
- } else {
- event.returnValue = false;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement