The problem is more pronounced in ie where if you close the map dialog and open it again, you will notice a scroll bar and see two maps in the window.<br><br><div class="gmail_quote">On Wed, Jul 2, 2008 at 10:00 PM, Raj Chundur <<a href="mailto:rajchundur@gmail.com">rajchundur@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Eric, Fellow Users<br>Thanks for the info. I have posted the barebones of the application as an example at<br>
<a href="http://cagismaps.hamilton-co.org/CWCC_APP/CWCC_launch.html" target="_blank">http://cagismaps.hamilton-co.org/CWCC_APP/CWCC_launch.html</a><br>
Note: Firefox displays error better than ie.<br><br>The app loads openlayers in a map dialog window. The user may close and open this map multiple times. So to ensure all Javascript objects are cleaned out I call the map.destroy when the map dialog is closed.<br>
I get the error Type Error:element is null.<br><br>I am able to trace the error down from map.destroy (in map.js) to layer.destroy (in layer.js) for each kamap layer i have added to image.destroy (in tile.js) where the call OpenLayers.Event.stopObservingElement(<a href="http://this.imgDiv.id" target="_blank">this.imgDiv.id</a>); is causing the error.<br>
Looking at the code in stopObservingElement It seems that <a href="http://this.imgDiv.id" target="_blank">this.imgDiv.id</a> is not resulting in an object in the call<br>var element = OpenLayers.Util.getElement(elementParam);<br>
the error is resulting from element being null at this stage in the tile clean up code.<br>
<br>Appreciate any help in this regard.<br><font color="#888888"><br>RC</font><div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Tue, Jun 24, 2008 at 6:07 PM, Eric Lemoine <<a href="mailto:eric.c2c@gmail.com" target="_blank">eric.c2c@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div>On Wed, Jun 11, 2008 at 6:53 AM, Raj Chundur <<a href="mailto:rajchundur@gmail.com" target="_blank">rajchundur@gmail.com</a>> wrote:<br>
> I have incorporated openlayers in a rich internet application with the map<br>
> inside a dialog window that can be opened and closed without page refresh.I<br>
> have been getting some heavy memory leaks even though I had dereferenced the<br>
> openayers map object. In order to avoid memory leak and ensure that the<br>
> openlayers map is destroyed when the dialog hosting the openlayers map is<br>
> closed i tried calling the map.destroy. However the call to map.destroy<br>
> fails at two places. One is on the overview map which has a single layer of<br>
> type openlayers.layer.image. So removed the overview conrol. The second is<br>
> on a tiled kamap layer though other kamap layers are destroyed without<br>
> error. (The base layer is of type openlayers.layer.iamge type)) Trying to<br>
> debug leads upto the clear grid on the httprequest..js where the error<br>
> happens with "element has no property". Have spent considerable time trying<br>
> to figure out the cause. Any help?<br>
<br>
</div></div>Hi Raj, with no example showing the problem it's very unlikely that<br>
you get assistance on the mailing list. Regards,<br>
<br>
--<br>
<font color="#888888">Eric<br>
</font></blockquote></div><br>
</div></div></blockquote></div><br>