it worked! thanks! Cheers, Adorian
http://mybiosis.info On Wed, Dec 9, 2009 at 9:39 AM, Eric Lemoine <[email protected]>wrote: > On Wed, Dec 9, 2009 at 8:20 AM, Adorian Ardelean <[email protected]> > wrote: > > Hi, > > > > I am trying to register a "featuremodified" event to a vector layers > > containing a feature built from a GeoJSON file. > > > > For registering event, I have used both methods below: > > > > trails.events.register('featuremodified', '',serialize); > > or > > trails.events.on({featuremodified: > > function(feature){alert(feature.id)}}); > > > > > > serialize = function (feature) > > { > > alert(feature.id); > > } > > > > In both cases I receive an "undefined" in message box. > > > > Could somebody guide me on how this event should be registered so that I > > can get access to feature data? > > try: > > var serialize = function(e) { > alert(e.feature.id); > }; > > Cheers, > > -- > 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://openlayers.org/mailman/listinfo/users
