That should have been the default behavior . . . you shouldn't have had to do that.
Chad Killingsworth On Jun 11, 7:36 am, Kurt Agius <[email protected]> wrote: > Cheers susannah & all the others who tried to help. > Infact i just solved it by detecting the resize event of the window and then > triggering the resize event of my map, cheers :) > > On Fri, Jun 11, 2010 at 3:10 AM, Susannah (Google Employee) < > > > > [email protected]> wrote: > > Divs do not have a resize event - only the window does. > > > -Susannah > > > On Jun 10, 6:44 pm, Kurteknikk <[email protected]> wrote: > > > 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]<google-maps-js-api-v3%2B > > [email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-maps-js-api-v3?hl=en. -- 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.
