[OpenLayers-Users] How to handle events

Alan U alan.underwood at hotmail.co.uk
Thu Oct 26 03:26:29 EDT 2006


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

-- 
View this message in context: http://www.nabble.com/How-to-handle-events-tf2512349.html#a7006393
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list