Handling events

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Handling events

Alan U
Sorry if you've already received this message before, but I'm having issues with nabble...

I was wondering (=desperately hoping) that someone might be able to describe
how the event handling is supposed to be used in the openlayers code.
I am trying to write my own control for creating layers and markers and, as
you would expect, it needs to use a lot of event handling. I've looked at
the LayerSwitcher control which sometimes uses Events.register on the map
object and sometimes uses Event.observe and I looked at PanZoomBar which
uses Events.register on both the map object and on some Events objects it
defines itself. I got quite confused.
 
When is Events.register supposed to be used rather that Event.observe and
vice-versa.
 
Any guidance?
 
Alan