On Oct 22, 2:18 pm, MikeP <[EMAIL PROTECTED]> wrote:
> I am having a similar problem in both IE6 and IE7.  The center of the
> map shows up in the upper left hand corner.  I am developing a portlet
> for IBM WebSphere Portal which contains the Google Map.  Essentially I
> don't have direct access to the <head> or <body> section of the page.

How do you do anything to it if you can't change the head or the body?

> I am trying to add both my own JS and the Google Map JS dynamically to
> the <head>, but then I get a Product Key error from Google (even
> though it is on the same server).  Here is my code:
>
> <script type="text/javascript" djConfig="parseOnLoad: true" src="<
> %=request.getContextPath()%>/javascript/dojo/dojo.js"></script>
> <script src="http://maps.google.com/maps?
> file=api&amp;v=2&amp;key=".....key here....."
>    type="text/javascript"></script>
>
> <div id="map" style="width: 500px; height: 300px"></div>
>
> <script type="text/javascript">
>         var headSection = document.getElementsByTagName("head");
>         var sc2= document.createElement("script");
>         sc2.setAttribute("src","<%=request.getContextPath()%>/javascript/
> map.js");
>         sc2.setAttribute("type","text/javascript");
>         headSection[0].appendChild(sc2);
>
>         dojo.addOnload=initialize();
> </script>
>
> Initialize is the function which creates my map- the map shows up
> perfectly fine and centered in FF, but in IE the center is positioned
> in the upper left corner.  Any ideas how/where I should be placing my
> code ?

IE is picky.  It is really hard to guess what it is doing wrong given
the information in your post.  The symptom implies that when the map
is rendered the browser hasn't determined the correct size for the div
which contains it.  I can't guess why that is with the information you
have given (unless the map div is hidden when the page loads).  Please
follow the posting guidelines and post a link to your map that shows
the problem.  See the posting guidelines for the many reasons a link
is preferred:
http://groups.google.com/group/Google-Maps-API/web/suggested-posting-guidelines

  -- Larry

>
> On Oct 22, 3:21 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > On Oct 22, 10:47 am, Matis Masters <[EMAIL PROTECTED]> wrote:> Hi everyone, 
> > i am having a problem with IE. In FF, and Chrome the maps
> > > looks fine after looking for any postcode, for example "90210", but in
> > > IE it doesn't show the right center of the maps. I found out that the
> > > problem is that the map images are not well positioned on IE, they
> > > stare some pixels up and to the left. so because of that the maps
> > > isn't displaying well... Here is the link.
>
> > > I think it could be something regarding the styles or something.
>
> > >http://shopping.netsuite.com/s.nl/c.332655/it.I/id.1/.f
>
> > Your code is inside the DOM (inside a table), IE doesn't handle that
> > well, either move it to the end (just before the </body> tag) or put
> > it in the head and execute it using the body onload function.
>
> >   -- Larry- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to Google-Maps-API@googlegroups.com
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