On Wednesday, July 29, 2009, Alexandre Dube <ad...@mapgears.com> wrote: > Hi,
Hi Alexandre > > I'd like to know if there's a better (faster) way to restore a > modified feature's geometry other than using layer.refresh({'force':true}); > > I use a ModifyFeature control with a popup that as save and cancel > buttons. On save, it commits the changes (fine). On cancel, it should > 'restore' the feature to its original state (at least the geometry). > > I tried to clone the feature + fid before modifications, then on > cancel destroy the original feature and add the clone but it's obviously > wrong to do so since it becomes unbound to its source. What do you mean by "becomes unbound to its source"? I'd tend to think that cloning feature+fid is a good solution... > > I also tried to clone the geometry only but I had weird behaviors > (duplicated features). > > Any hint ? > > -- > Alexandre Dubé > Mapgears > http://www.mapgears.com > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- 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.lemo...@camptocamp.com http://www.camptocamp.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users