Hi friends,
I'm using google maps api v3 and i'm trying to listen for the resize
event but i just can't get it working. Is this code correct ? Btw
mapCanvas is the real div's name so that is 100% correct. And map
obviously is a public variable containing the current map.
This is the code i'm talking about:
//Trigger the resize event when map's div is resized
var mapDiv = document.getElementById('mapCanvas');
google.maps.event.addDomListener(mapDiv, 'resize', function(){
alert('div resize');
google.maps.event.trigger(map,'resize');
});
google.maps.event.addListener(map, "resize", function() {
alert('resize');
});
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.