Hi, I wrote ModifyFeature and DragFeature widgets (attached). The code is quite ugly, either I am missing something or OL handlers/controls need a setLayer() method. Note reloadModelOnSelect and autoSelectFeature options which I had to add to enable the workflow we use: 1) select a feature from WMS 2) load the selected feature to FeatureCollection 3) modify the feature in FeatureCollection 4) upload modified feature to database 5) refresh WMS layer This is, I think, the only possible way in real applications (thousands of features).
Maybe bugs?: - lib/util/proj4js/defs/EPSG26591.js - missing '+units=m' - lib/widget/GmlRendererOL.js in loadGML - maybe missing this.destroyFeatures(); otherwise features are always added to layer whenever the model doc is reloaded but old features are never deleted - lib/widget/EditButtonBase.js - change objRef.setFeature(objRef); to objRef.setFeature(objRef, feature); Radim
ModifyFeature-1.js
Description: JavaScript source
DragFeature-1.js
Description: JavaScript source
------------------------------------------------------------------------- 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
