[OpenLayers-Dev] Event listeners and/or onXXX methods

Xurxo Mendez xmendez at udc.es
Fri Nov 5 14:01:31 EDT 2010


Hi all,

This is a question I asked some times myself when using some OpenLayers
features, and it raised again after reading Bart's post in GeoExt devs list
(http://www.geoext.org/pipermail/dev/2010-November/000893.html). There are
some classes that trigger some event (of some types) when some things occur
(e.g. the SelectFeature control triggers, for instance,
*featurehighlighted*event). Other (or same) classes provide the user
with functions he can write
and they will be executed also when some things occur (e.g. the same
SelectFeature control, the *onSelect* function). So far I didn't find a
duplicate use case, but I understand those are 2 different ways to do the
same thing (maybe the order your code is executed is determined in a
different way). Are they almost the same or is there a way preferred? Maybe,
if that's the case, this could be reconsidered in OpenLayers 3

Best regards,

Xurxo Méndez Pérez

http://www.sonxurxo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20101105/f78f3564/attachment.html


More information about the Dev mailing list