To unregister a listener, you need to pass a reference to the function that you defined in the register method, so e.g.
var listener = function() {...}; events.register('myevent', this, listener); events.unregister('myevent', this, listener); Andreas. On Mon, Jul 29, 2013 at 3:59 PM, gabriel <gpetri...@gmail.com> wrote: > Hi Andreas, > > I have a little bit different problem. Im using two events for selecting > features. > A) selectFeature.events.register("boxselectionend", vector, > function(){...}) > B) selectFeature.events.register("featurehighlighted", vector, > function(){...}) > > After selecting the features , they are subsequently deleted. And there is > the problem. After using boxselectionend event, the featurehighlighted > event > is launched. Thats normal , because features are highlighted after > boxselection event. So i tried to unregister the featurehighlighted event > in boxselectionend event like this: > > selectFeature.events.unregister("featurehighlighted", vector, > function(handler)); > > but event is still active. > > > > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/activate-deactivate-events-tp3913790p5069373.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > us...@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers.
_______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users