it worked! thanks!<br>
<br>
Cheers,<br>
Adorian<br>
<br>
<a href="http://mybiosis.info">http://mybiosis.info</a><br><br><div class="gmail_quote">On Wed, Dec 9, 2009 at 9:39 AM, Eric Lemoine <span dir="ltr"><<a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">On Wed, Dec 9, 2009 at 8:20 AM, Adorian Ardelean <<a href="mailto:mynature@gmail.com">mynature@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I am trying to register a "featuremodified" event to a vector layers<br>
> containing a feature built from a GeoJSON file.<br>
><br>
> For registering event, I have used both methods below:<br>
><br>
> trails.events.register('featuremodified', '',serialize);<br>
> or<br>
> trails.events.on({featuremodified:<br>
> function(feature){alert(<a href="http://feature.id" target="_blank">feature.id</a>)}});<br>
><br>
><br>
> serialize = function (feature)<br>
> {<br>
> alert(<a href="http://feature.id" target="_blank">feature.id</a>);<br>
> }<br>
><br>
> In both cases I receive an "undefined" in message box.<br>
><br>
> Could somebody guide me on how this event should be registered so that I<br>
> can get access to feature data?<br>
<br>
</div></div>try:<br>
<br>
var serialize = function(e) {<br>
alert(<a href="http://e.feature.id" target="_blank">e.feature.id</a>);<br>
};<br>
<br>
Cheers,<br>
<br>
--<br>
Eric Lemoine<br>
<br>
Camptocamp France SAS<br>
Savoie Technolac, BP 352<br>
73377 Le Bourget du Lac, Cedex<br>
<br>
Tel : 00 33 4 79 44 44 96<br>
Mail : <a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br>
<a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
</blockquote></div>