[OpenLayers-Dev] register Events, deactivate->unregister,
activate->register, destroy->unregister and destroy,
ufff! I had an idea!
Xavier Mamano
xavier.mamano at gmail.com
Mon Apr 12 17:57:42 EDT 2010
Hi devs,
My idea has three parts
1. In the ticket #2518 I proposed the new method addListener for controls.
By calling it, the events and listeners are stored in an array and there was
no need to do anything else. And now I thought: their use can be transverse
on many OpenLayers objects.
2. On the other hand I was worried about the unintended effects of
KeyboardDefaults control. I thought: to move the cursor on the map, the
mouse is used exclusively almost. Therefore the solution was that
KeyboardDefaults don't work when the mouse is out the map.
3. moseover/moseout had a problem: many events occur that are not relevant.
This was a problem that I've solved by new mapmouseover/mapmouseout events.
And their use also can be transverse.
See it working in:
http://perso.wanadoo.es/xavier.mamano/sandbox/addlistener/examples/addlisten
er.html
NOTE: the code OpenLayers.js is compressed due to problems with my hosting.
See ticket http://trac.openlayers.org/ticket/2577 for changes in the code, I
opened this ticket to discuss my approach, would appreciate any comments.
That's all folks!
Xavier Mamano
More information about the Dev
mailing list