I have a method called udpateMapSize() that's run 4 times a second.
What it does is calculate the size of the browser, then update the map
div  with that size.

It also takes into affect a collapsable panel I have.

here's the script:

function updateMapSize()
{
        //IE7 is 21 pixels LESS than FireFox.
        //Pretty much we want to keep the map to the maximum size alloted.
        getSize();
        if(browserWidth > 900)
        {
                //Side bar is 200px, but we should take some px off of it for
padding.
                //header is 80px hight. take some px off for padding.
                if(document.getElementById("aToggleSideBar").className ==
"collapse")
                {
                                mapWidth = browserWidth - 290;
                }
                else
                {
                                mapWidth = browserWidth - 50;
                }

                var mapHeight = browserHeight - 60;
                var sideBarHeight = browserHeight - 60;


                if(document.getElementById("dPlaybackInfo").style.display == "")
                {
                        mapHeight -= 30;
                        sideBarHeight -= 30;
                }
                document.getElementById("map").style.width = mapWidth + "px";
                document.getElementById("dPlaybackInfo").style.width = mapWidth 
+
"px";
                document.getElementById("leftSide").style.width = mapWidth + 
"px";
                document.getElementById("map").style.height = mapHeight + "px";
                document.getElementById("rightSide").style.height = 
sideBarHeight +
"px";
                document.getElementById("sideBar").style.height = 
(sideBarHeight -
50)+ "px";

                if($get("sPlayback_railElement"))
                {
                        $get("sPlayback_railElement").style.width = mapWidth - 
600 + "px";
                }

                document.getElementById("dMessage").style.width = mapWidth + 
"px";
                document.getElementById("dMessage").style.height = mapHeight + 
"px";

        }
        setTimeout("updateMapSize()", 250);

}

however, what I find is when I minimize the collapseable panel, the
"Map" expands the extra 240px to the right, however no tiles show.
It's just gray, but I see the google copyright information there.

So... If you're map was 400px wide, expand it to 650. the extra 250
would be grey, but no tiles loaded.

Now if I resize the browser it loads the tiles in that section
perfectly.


This only happens in IE, not in FireFox / Chrome.

--

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=.


Reply via email to