Hi Eric Thanks for your suggestion but unfortunately it doesn't help - I tried to destroy the SelectFeature Control (testing if null first) before destroying the vector layer, but there was no change to the problem - I still get 'zIndex is null' errors each of the even number of times that I call it.
Is there some other way, for example forcing the zIndex to be some arbitrary value before destroying the layer? I have been trying to devise something on those lines but have not found a workable method up to now. Chris -----Original Message----- From: Eric Lemoine [mailto:[email protected]] Sent: 12 April 2010 10:35 To: [email protected] Cc: [email protected] Subject: Re: [OpenLayers-Users] vector layer destroyed twice throws error On Mon, Apr 12, 2010 at 10:16 AM, Chris Green <[email protected]> wrote: > Hi Eric > > The code I am using (slightly simplified) is below. I am not calling > getZIndex, I have been assuming that it is called somehow as part of the > layer.destroy() function Layer.destroy() doesn't call getZIndex. What calls getZIndex is the Feature handler (used in the SelectFeature control). Before destroying the layer you can try to destroy the SelectFeature control attached to that layer. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
