Hi, On Dec 11, 2007 4:40 PM, Radim Blazek <[EMAIL PROTECTED]> wrote: > I wrote ModifyFeature and DragFeature widgets (attached).
Nice work. Thanks for that contribution. > The code is quite ugly, either I am missing something or > OL handlers/controls need a setLayer() method. The problem is that when createControl is called, there might not be a GMLRendererOL initialized. Also, on a newModelEvent, the layer used by GMLRendererOL will be deleted. As you might have seen, the editing buttons in Mapbuilder (based on EditButtonBase) create their own vector layer. GMLRendererOL was designed to render a FeatureCollection from a model, without editing in mind. Maybe a cleaner way for your widgets would be to plug into GMLRendererOL more like the FeatureSelectHandler tool than like the existing editing buttons. As you might have realized, the editing tools in OpenLayers follow a workflow similar to Control.SelectFeature: a feature is selected using the mouse before editing. > Maybe bugs?: > - lib/util/proj4js/defs/EPSG26591.js - missing '+units=m' Thank you, just fixed that. > - lib/widget/GmlRendererOL.js in loadGML - maybe missing > this.destroyFeatures(); True. Thanks for that one. Reported in MAP-470 and fixed in r3720. > - lib/widget/EditButtonBase.js - change objRef.setFeature(objRef); to > objRef.setFeature(objRef, feature); This might be a useful extension for the future, when the editing tools are more OL-based than they are now. But I doubt that editing existing features should be done with button widgets at all (see what I wrote about SelectFeature above). Your work is a good attempt to bring better feature editing capabilities to Mapbuilder. But, as you might have seen while working on it, the current architecture of editing buttons is not suited very well for OpenLayers-based feature editing. Rich feature editing will be introduced in a future release of Mapbuilder, we have no schedule for that yet. In the meantime, your patch can be useful for people who need better feature editing capabilities than Mapbuilder offers now. Maybe you want to file a JIRA issue at http://jira.codehaus.org/browse/MAP, with your comments and attachments. This will make it easier for us and other users to find your patches. If you want to take your work as a base for something that will make it into Mapbuilder trunk, your ideas as well as your active workforce would be highly appreciated. There will be open space for new features after the 1.5 release cycle, which we will hopefully be finishing within the next 1-2 months. After that, I will be glad to discuss new ideas, use cases and design ideas on feature editing. Regards, Andreas. ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ mapbuilder-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel
