Map Center on window change
-
Hello there,
First of all, congrats for this useful plugin.
Is it possible to insert in the javascript code the event to handle the map recenter on window change? I could edit the source my self but I will lose these changes everytime it updates.
//map1 reference can only be obtained at map creation, cannot get it from DOM //center can also be obtained from map options center = map1.getCenter(); $(window).resize(function(){ //Trigger map repaint, to calculate new container sizes, etc google.maps.event.trigger(map1, "resize") //This works from DOM //Set map center(based on new container width and height) map1.setCenter(center); })Could be another way
Just my two cents 🙂Thank you,
Chris
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Map Center on window change’ is closed to new replies.