Skip to content

Instantly share code, notes, and snippets.

@JarrydLong
Created August 31, 2017 19:56
Show Gist options
  • Select an option

  • Save JarrydLong/63ca31e9a2ab893e292be8efe27aef20 to your computer and use it in GitHub Desktop.

Select an option

Save JarrydLong/63ca31e9a2ab893e292be8efe27aef20 to your computer and use it in GitHub Desktop.
Reset the map to the original zoom level when closing the info window
google.maps.event.addListener(infoWindow[wpmgza_marker_id],'closeclick',function(){
MYMAP[map_id].map.setZoom(parseInt(wpgmaps_localize[map_id]['map_start_zoom']));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment