-
-
Save andtrev/cddc0f4ad69b0c17a428dbd398131ecb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function( $ ){ | |
$('body').on('wpgooglemaps_loaded', '.wpgmza_map', function(){ | |
var map_id = parseInt($(this).attr('id').replace('wpgmza_map_','')); | |
if (wpgmaps_localize_polygon_settings !== null){ | |
setTimeout(function(){wpgmaps_polygons_link_click(map_id)},3000); | |
} | |
}); | |
function wpgmaps_polygons_link_click(map_id){ | |
$.each(wpgmaps_localize_polygon_settings[map_id],function(i,v){ | |
google.maps.event.addListener(WPGM_Path_Polygon[i], "click", function(e){ | |
if (v['link'] !== ''){ | |
window.location = v['link']; | |
} | |
}); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment