Skip to content

Instantly share code, notes, and snippets.

@toddmotto
Created April 28, 2013 18:56
Show Gist options
  • Save toddmotto/5477991 to your computer and use it in GitHub Desktop.
Save toddmotto/5477991 to your computer and use it in GitHub Desktop.
Center Google Maps Marker positioning on window.resize
google.maps.event.addDomListener(window, 'resize', function() {
var center = map.getCenter()
google.maps.event.trigger(map, "resize")
map.setCenter(center)
})
@niktechnopro
Copy link

That was a great help, thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment