Eric, Thanks. That piece of code worked for me. Regards,
Un saludo, ·················································································· David Alda Fernández de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n · 01192 · Arkaute (Araba) ·················································································· Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ·················································································· email: [email protected] web: www.ikt.es ·················································································· -----Mensaje original----- De: Eric Lemoine [mailto:[email protected]] Enviado el: lunes, 21 de marzo de 2011 9:30 Para: David Alda Fernandez de Lezea CC: [email protected] Asunto: Re: [OpenLayers-Users] How can I catch an OL event inside a custom tool On Mon, Mar 21, 2011 at 8:24 AM, David Alda Fernandez de Lezea <[email protected]> wrote: > Eric, > > Thanks for your response. I've done something like this: > > initialize: function(layer, options) { > > ... > this.EVENT_TYPES.push("featureselected"); Remove this. > ... > > this.events.on({ > featureselected: function(evt) { > var myEvt = evt; > } > }); > Do this instead: layer.events.on({ featureselected: function(evt) { var feature = evt.feature; } }); -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
