[OpenLayers-Users] event unregister api does not work? How to unregister event handler in OpenLayers API

JK Chen jk.chen at sdl.usu.edu
Mon Jul 11 13:52:52 EDT 2011


Hi,

I have a program that register/unregister click event for a map. When click, a marker will be insert at the clicked point, while removing previous markers.  My call to register() works, but the call to unregister() does not remove the handler.


1.      Here is how I register,  and it works fine (because my handler is triggered)

events.register("click", geoCovObj.map.map, geoCovObj.triggerPoint);

2.      Here is how I unregister, but it does not work (because my handler continues to be triggered)
events.unregister("click", geoCovObj.map.map, geoCovObj.triggerPoint);

Anyone has ideas?

Please help. Thanks.

JK Chen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110711/6e2f0828/attachment.html


More information about the Users mailing list