<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.16788" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Add this line before the map div and you should see what I'm seeing.</DIV>
<DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div style="width:200px;height:200px;background-color:#666;float:left"&gt;&lt;/div&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>So the map div has not been modified from what you'd see in the tutorials, it only has width and height defined. It is not positioned at all, just moved aside by another div that is positioned. I guess that's the problem.</DIV>
<DIV>&nbsp;</DIV>
<DIV>~Craig</DIV>
<DIV><BR><BR><BR>Date: Mon, 23 Feb 2009 15:36:03 -0500<BR>From: Christopher Schmidt <BR><BR>On Tue, Feb 24, 2009 at 09:31:28AM +1300, Craig Stanton wrote:<BR>&gt; Hi all,<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I'm new to OpenLayers but have done a lot of searching to find a<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; solution to a problem I have come across straight away. What I did<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; was place a div to the left of the map div, held there by a<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; style="float:left" command. I then discovered that my<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; double-clicks on the map are interpreted as if the map is still up<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; against the left side of the browser window. So if the other div<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; is 100 wide the map is moved 100 pixels to the right. I then click<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; on Africa and the map thinks that I've clicked on Australia. <BR>&gt;&nbsp; <BR>&gt; I've seen some emails in these archives discussing the use of map.updateSize(). I put that into my init function but it changed nothing. I believe the problem is that OpenLayers is not aware that it has been displaced from the side of the window. Has anyone come across this and found a solution?<BR><BR>Is your map div positioned absolutely? I would not be surprised to find<BR>that this would be a problem in this case. Otherise, the best thing to<BR>do is take the smallest possible OpenLayers example:<BR><BR>&nbsp; <A href="http://openlayers.org/dev/examples/lite.html">http://openlayers.org/dev/examples/lite.html</A><BR><BR>Modify it as little as possible, and demonstrate the buggy behavior,<BR>preferably by linking to a live instance of it. Ading<BR>style='float:right' to that map div did *not* allow me to reproduce the<BR>effect, so I will need more information to understand the problem.<BR><BR>Regards,<BR>-- <BR>Christopher Schmidt<BR>MetaCarta<BR><BR><BR>------------------------------<BR><BR>_______________________________________________<BR>Dev mailing list<BR>Dev@openlayers.org<BR><A href="http://openlayers.org/mailman/listinfo/dev">http://openlayers.org/mailman/listinfo/dev</A><BR><BR><BR>End of Dev Digest, Vol 29, Issue 27<BR>***********************************<BR></DIV><BR>

    <div>
      NIWA is the trading name of the National Institute of Water &amp; 
      Atmospheric Research Ltd.
    </div>
  </BODY></HTML>