[OpenLayers-Users] activate / deactivate events

Andreas Hocevar ahocevar at opengeo.org
Tue Jul 30 04:21:21 PDT 2013


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 <gpetricek at 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
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130730/df137798/attachment.html>


More information about the Users mailing list