Skip to content

Instantly share code, notes, and snippets.

@toddmotto
Created April 28, 2013 18:56
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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)
})
@hometoy
Copy link

hometoy commented Oct 17, 2017

tks!

@vanarsdale
Copy link

ty!

@Sk-OmarFaruque
Copy link

not working

@gimsunghwan
Copy link

Thank you very much!

@janparkio
Copy link

thank you! This was extremely helpful

@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