I'm so sorry, your code works perfect!

So here is the final Code:

                function cmd_MPoly_to_Poly() {
                        var MPolyFeature = wfs_mpolygon.selectedFeatures;
                        var features = [];
                        var f = null;
                        var i = null;
                    
                        for(f in MPolyFeature) {
                                for(i in MPolyFeature[f].geometry.components) {
                                        var feature = new
OpenLayers.Feature.Vector(MPolyFeature[f].geometry.components[i].clone());
                                        feature.attributes.typ = 
MPolyFeature[f].attributes.typ;
                                        feature.attributes.tst = 
MPolyFeature[f].attributes.tst;
                                        feature.state = OpenLayers.State.INSERT;
                                        features.push(feature); 
                                }                               
                        }
                        
                        wfs_polygon.addFeatures(features);
                        wfs_mpolygon.removeFeatures(MPolyFeature);
                        wfs_polygon.redraw();
                }



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Multipolygon-to-Polygons-tp5003436p5003504.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to