Andrew Leach wrote: > Javascript is used to manage the resizing of the map. In the code of > page http://maps.google.com/have a look at function resizeApp(). This > doesn't have much to do with the API though.
Before figuring out how to resize it, we've got to understand how to declare the map div to be resizable without resizing the parts of the window that should not be resized. I agree that isn't exactly part of the API, but it's absolutely essential for proper presentation of the maps that we create by using the API, so it's a relevant question for this forum. Like the original poster, I want to be able to do exactly what a basic Google Maps page does: present a page which has a header division which doesn't change height when the window is resized and a map division which fills up the rest of the window exactly (or as near as makes no practical difference) *without* letting the browser create a scroll bar. The example cited by JPerelli doesn't do the trick, because the heights of both divs change when the window is resized. Looking at the source code for a live Google Map doesn't help because it's deliberately obfuscated, containing many oddly-named divs that depend on connections to style sheet class names. And the map itself is only part of what follows the fixed-height header div. The only way I can get a map to display decently is to use a fixed- height div (in this case, 800px): http://www.gcna.org/data/atlas/GMap-sample-FixedHeight.html?XMWW But unless you've got a fairly big screen, you'll see a scroll bar at the right side, and I do NOT want that! If I don't specify the height of the div, then the map is only about 1 cm high - not even as tall as the zoom control.: http://www.gcna.org/data/atlas/GCNAmap-Float.html?XMWW Specifying the height of the div as a percentage gives me the same result, regardless of the percentage value. Obviously that's useless. I've searched this forum, searched HTML references and tutorials, searched CSS references and tutorials, and haven't found anything relevant. So, how can Maps API users accomplish what Google does with its floating map height and fixed header height? -- 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.
