<br><div><span class="gmail_quote">On 31/08/07, <b class="gmail_sendername">Christopher Schmidt</b> &lt;<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri, Aug 31, 2007 at 04:12:54PM +1000, Glen Stampoultzis wrote:<br>&gt; Hi...<br>&gt;<br>&gt; just been mucking around with popups and I noticed that the destroy method<br>&gt; does seem to get called.&nbsp;&nbsp;The close poup button just hides the div from what
<br>&gt; I can tell and the map.removePopup() call seems to remove the div from the<br>&gt; DOM without calling destroy and cleaning up the event handlers.<br>&gt;<br>&gt; Bug or feature?<br><br>When would you call destroy? Certainly, a popup can be removed from the
<br>map without it being destroyed: it can be re-added at a later time, and<br>we use that behavior in some applications here at MetaCarta.<br><br>In general, removing things is not the same as destroying them, and<br>depending on when they are created, you may have to clean up after
<br>yourself rather than depending on OpenLayers to do it for you.<br><br>If you use a feature to create the popup, it destroys the popup for<br>you. If you create your own, you&#39;re on your own.<br><br></blockquote></div>
<br>It&#39;s just that popup doesn&#39;t provide any way for you to attach an event indicating the user has closed the popup using the close button so how do you know when to destroy?<br><br>Regards,<br><br>Glen<br><br><br>
<br><br>