[OpenLayers-Users] registering featuremodified

Adorian Ardelean mynature at gmail.com
Wed Dec 9 03:15:41 EST 2009


it worked! thanks!

Cheers,
Adorian

http://mybiosis.info

On Wed, Dec 9, 2009 at 9:39 AM, Eric Lemoine <eric.lemoine at camptocamp.com>wrote:

> On Wed, Dec 9, 2009 at 8:20 AM, Adorian Ardelean <mynature at gmail.com>
> 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 : eric.lemoine at camptocamp.com
> http://www.camptocamp.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091209/4ce7a05d/attachment.html


More information about the Users mailing list