On Dec 19, 2007 3:51 PM, Christopher Schmidt <[EMAIL PROTECTED]> wrote: > On Wed, Dec 19, 2007 at 01:06:34PM +0100, Eric Lemoine wrote: > > Does the problem exist on the OpenLayers examples (for example > > <http://openlayers.org/dev/examples/modify-feature.html>)? I haven't > > been able to reproduce here. > > If you are *currently* in the process of drawing a new feature, and you > refresh the page, then the Map.destroy function which is called on page > onunload loops through the controls and destroys them. The Control calls > the Handler destroy, which calls the handler deactivate() method, which > (in the Point handler) calls the this.cancel() if drawing is true, which > then calls this.layer.renderer.clear()... > > ... But because the controls are destroyed *after* the layers in the map > destroy() function, the layer has already been destroyed, and it has no > renderer property, which means that IE throws an error. > > I can reproduce this in IE7. Someone should file this as a bug, and we > should write a test for it. The test should look like: > > var handler = new OpenLayers.Handler.Point(); > handler.activate(); > handler.layer.destroy(); > handler.deactivate(); > > Though in a quick test inside Firebug lite, new OpenLayers.Handler() > returns undefined, so I'm probably missing something more important. > > This should be a blocker for 2.6.
<http://trac.openlayers.org/ticket/1222> -- Eric _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
