features is an array of features, so there is no "geometry" or "state"
attribute.
Try this:
function cmd_Poly_add() {
var features = wfs_polygon.selectedFeatures;
wfs_polygon.removeFeatures(features);
var f = null;
for( f in features) {
features[f].geometry = new
OpenLayers.Geometry.MultiPolygon(features[f].geometry);
features[f].state = OpenLayers.State.INSERT;
}
wfs_mpolygon.addFeatures(features);
}
Am 20.09.2012 15:03, schrieb vGIS:
Hi, thanks for your reply!
Code:
function cmd_Poly_add() {
var features = wfs_polygon.selectedFeatures;
wfs_polygon.removeFeatures(features);
features.geometry = new
OpenLayers.Geometry.MultiPolygon(features.geometry);
features.state = OpenLayers.State.INSERT;
wfs_mpolygon.addFeatures(features);
}
When I call the function the chosen featurers disappear, but don't appear on
the other layer (wfs_mpolygon). When the save strategy is called (WFS-data
viewed with FireBug), there appear neither inserted, updated nor deleted
features (XML POST/GET).
Kind regards,
vGIS
--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/Move-selected-Features-to-another-geometry-layer-tp5003226p5003236.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
--
--------------------------------------------------
Slawomir Messner
Forschungszentrum "Deutscher Sprachatlas"
06421-28-24981
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users