If you want to go with a resize event setting your map size then you can find an example on a map of mine here:
http://kort.bellamallorca.dk/kort/google_map_large.php >From the source code - i added an event listener for the window resize event: if(window.addEventListener){ window.addEventListener( 'resize', function(){ fitMapToBrowser(); }, false ); } else { window.attachEvent( 'onresize', function(){ fitMapToBrowser(); }); } And the fitMapToBrowser() function: function fitMapToBrowser(){ var $height=document.documentElement.clientHeight-14; if($height<288){ $height=288; } document.getElementById('sidebarLeft').style.height= ($height-126)+'px'; document.getElementById('locationsCtnCtn').style.height= ($height-143)+'px'; $height+='px'; document.getElementById('mapCtn').style.height=$height; document.getElementById('sidebarRight').style.height=$height; var $width=document.documentElement.clientWidth-420; if($width<352){ $width=352; } $width+='px'; document.getElementById('mapCtn').style.width=$width; if(typeof(map)!=='undefined'){ map.checkResize(); map.setCenter(map._lastCenter); if(map.helpHtmlControl.active){ var i=map.helpHtmlControl.active; toggleHelp(i); toggleHelp(i); } } } (That function is obfuscated in the online page btw) It's worked on all browsers i've tested it with. Martin. On 18 Aug, 15:09, ender <[email protected]> wrote: > I did something along these lines on my map > athttp://www.keytosavannah.com/maps/search/ > using jQuery height/width calculations on the map div: > > function windowResize() { > var width = $(window).width(); > var height = $(window).height(); > > $("#left").height(height-90); > $("#main").width(width-380); > $("#main").height(height-90); > $("#category-search").hide(); > $(".ui-tabs-panel").height(height-103-$(".ui-tabs-nav").height()); > $("#category-search").height($(".ui-tabs-panel").height()-80-$("#text- > search").height()-$("#location-search").height()); > $("#category-search").show(); > > } > > my requirements were a bit more complex than yours so the code you'd > need wouldn't be quite so involved... should get you started though. > > -Ty Wangsness > > On Aug 17, 8:48 pm, Wes Saalmink <[email protected]> wrote: > > > I've been trying to solve a problem with embedding Google Maps > > fullscreen on a website, but making it scale in height. > > > To put it simple, I want Google Maps to display full-screen, but I > > have a 25px header I want to show above it. > > Somehow, it's possible to make the map scale in width to 100% (like > > the example > > ofhttp://groups.google.com/group/Google-Maps-API/browse_thread/thread/b...) > > but I can't make it do the same in height. I always end up with a > > scrollbar on the right. And if I hide the scrollbar, then the Google > > logo isn't visible anymore so that's a no-go aswell. > > > Has anyone else had this problem? > > My current test page is over here:http://www.noxious.org/test_maps.html > > > Thanks in advance! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" 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-API?hl=en -~----------~----~----~----~------~----~------~--~---
