Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DylanCodeCabin/9e505e2887854da4e383d9cb3d425cd5 to your computer and use it in GitHub Desktop.
Save DylanCodeCabin/9e505e2887854da4e383d9cb3d425cd5 to your computer and use it in GitHub Desktop.
jQuery(window).load(function(){
for(var poly_i in WPGM_Path_Polygon){
google.maps.event.addListener(WPGM_Path_Polygon[poly_i], 'mouseover', function(event){
google.maps.event.trigger(this, 'click', {latLng: event.latLng});
});
google.maps.event.addListener(WPGM_Path_Polygon[poly_i], 'mousemove', function(event){
for(var info_idx in infoWindow_poly){
if(typeof infoWindow_poly[info_idx].close !== 'undefined'){
infoWindow_poly[info_idx].close();
}
}
google.maps.event.trigger(this, 'click', {latLng: event.latLng});
});
}
for(var map_idx in MYMAP){
google.maps.event.addListener(MYMAP[map_idx].map.googleMap, 'mousemove', function(event){
for(var info_idx in infoWindow_poly){
if(typeof infoWindow_poly[info_idx].close !== 'undefined'){
infoWindow_poly[info_idx].close();
}
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment