Hi,

I have been playing around with resizing the map div according to
window size. I found this code, from Esa's maps:

document.getElementById("map").style.top="10%";
document.getElementById("map").style.left="2%";
document.getElementById("map").style.width="100%";

if (window.attachEvent) {
window.attachEvent("onresize",function(){ //IE
var hght=document.documentElement.clientHeight*0.7;
document.getElementById("map").style.height=hght+"px";
});
} else {
document.getElementById("map").style.height="600%";
window.addEventListener("resize", {}, false);
}

which works OK, but depends on the map div being absolutely positioned
in the CSS (which is causing me a separate headache, as you can see
here: http://www.xelawho.com/map/twocolumn.htm)...

I notice that there is a checkResize() function available, but haven't
been able to incorporate it - I'm not sure if this is what it's
designed to do (although the name and documentation would suggest that
it is).

So, I guess the question is, is the above code still the best way to
do this, or was it written prior to "checkResize()" , meaning that
there is some simpler way to go about this (hopefully involving a
relative positioning)

I searched the forum, but nothing seems to do what I want it to, which
I thought was odd. Thanks in advance...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" 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.

Reply via email to