When developing a web mapping application, the use of OpenLayers is only a piece among the set of tools that we need to use. Adding other components, such as buttons, images, lists, and so on, and interacting with them are other tasks that we must work on.
Interacting with a
OpenLayers.Map instance or
OpenLayers.Layer subclass is easy because they trigger specific events, but what if we want to listen for events on a button or any
For this purpose, OpenLayers offers us the
OpenLayers.Event class (do not get confused with the plural
OpenLayers.Events class). This is a helper class, which, among other things, allows us to listen for events in non-OpenLayers elements in a browser-independent way.