<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">you must not forget the<br>
<pre wrap="">MPolyFeature.<u>geometry</u>.components</pre>
<br>
Am 21.09.2012 10:13, schrieb vGIS:<br>
</div>
<blockquote cite="mid:1348215205317-5003440.post@n6.nabble.com"
type="cite">
<pre wrap="">I tried:
// MPolygon to Polygons
function cmd_MPoly_to_Polys() {
var MPolyFeature = wfs_mpolygon.selectedFeatures;
var features = new OpenLayers.Feature.Vector(new
OpenLayers.Geometry.Polygon());
var f = null;
for( f in MPolyFeature) {
features[f].geometry = new
OpenLayers.Geometry.Polygon(MPolyFeature.components[f]);
features[f].attributes.typ = MPolyFeature.attributes.typ;
features[f].attributes.tst = MPolyFeature.attributes.tst;
features[f].state = OpenLayers.State.INSERT;
}
wfs_polygon.addFeatures(features);
wfs_mpolygon.removeFeatures(MPolyFeature);
wfs_polygon.redraw();
}
FireBug output: "TypeError: MPolyFeature.components is undefined ...
features[f].geometry = new
OpenLayers.Geometry.Polygon(MPolyFeature.components[f]..."
--
View this message in context: <a class="moz-txt-link-freetext" href="http://osgeo-org.1560.n6.nabble.com/Multipolygon-to-Polygons-tp5003436p5003440.html">http://osgeo-org.1560.n6.nabble.com/Multipolygon-to-Polygons-tp5003436p5003440.html</a>
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
--------------------------------------------------
Slawomir Messner
Forschungszentrum "Deutscher Sprachatlas"
06421-28-24981</pre>
</body>
</html>