[OpenLayers-Users] How to add custom events to OpenLayers-based API?
João Rodrigues
joaorodr84 at gmail.com
Thu Aug 21 03:14:17 PDT 2014
Hi
I am woking on a GIS API built on top of OpenLayers. I have a class called
xgis.group, which represent a group of layers.
I want to add an event that can be triggered when a group is added.
For example, in the map, I have tried this without success:
xgis.map.prototype.addGroup = function(name) {
> /* CODE FOR ADDING A GROUP */
> /* Trigger when group is added */
> this.events.triggerEvent('groupadded', group);
> };
I don't know how to deal with custom-made events.
Could you lend me some help, please?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140821/f9f0a5b4/attachment.html>
More information about the Users
mailing list