Yes I'm using the DrawFeature and ModifyFeature controls. Only 1 layer needs to be edited at a time so that's fine.
What I'm unsure about is how to deal with the one-to-one relationship between a GeoExt.Action, an OpenLayers.Control and the layer referenced by the control. I was thinking that I'd probably need to do something like create a set of action instances for each layer and when a layer is selected in the map legend remove the set of existing toolbar layer actions and add the actions for the selected layer. Does this sound like a reasonable approach or is there a better way? Cheers Adam On 9/05/2010, at 7:30 PM, Eric Lemoine wrote: > On Sunday, May 9, 2010, Adam Ratcliffe <[email protected]> wrote: >> In my application I have multiple WFS layers that should be editable by the >> user. I have added GeoExt actions to the app toolbar for >> drawing/editing/removing polygons. Each of these actions wraps an OL >> control that has a reference to a single layer. How would I go about >> creating actions that can be shared by multiple layers? > > Hi. Are you using a ModifyFeature control? This control works with one > layer only, so editing multiple layers at the same time isn't really > supported by OpenLayers. At this point I would recommend a design > where the user chooses the layer he or she wants to edit (using a > combo box for example). > > 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://www.geoext.org/cgi-bin/mailman/listinfo/users
