On Jan 5, 11:38 am, "Pil (Trustworthy from experience)"
<[email protected]> wrote:
> Should be a timing problem: IE loads the DOM tree the other way round
> than a 'normal' browser, so the script inside of a table often never
> gets executed.
>
> Regardless of the appropriate reason, scripts inside of tables or the
> relicts of a table confuses IE - as far as I know expecially IE 6.

Scripts inside tables do get executed, in the order they are placed in
the page, but until the parser has reached </table>, every element in
the table has zero size. It's only sorted out when the element is
completely defined by reaching the </table> tag.

As the browser thinks the map has zero size at the time the script
runs, the API gets told it has zero size and uses that figure in
working out where to place the centre of the map and the number of
buffer-zone tiles to use. Zero size means everything is fixed on the
top-left corner of the map div.

There are several solutions. One is to ensure that the table is
completely defined when the script is run. You can do that in two
ways: either place the script at the bottom of the page (before </
body> and after every other closing tag) in order that every element
is completely defined before it's run; or use an onload handler so
that the page is complete before it's run. Another solution is to
force the API to use the correct size in its calculation -- whatever
the browser tells it about the map size -- by using the {size:} option
when constructing the GMap2 object.

Andrew
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to