Thanks for the advice, Bart.<br>I altered my code with the &quot;featurePrefix&quot; but the result is still the same, no feature showing up in my map. Is it possible, that the style of the feature could be somehow jinxed, e.g transparent? Or could there be any other reasons. It&#39;s my first openlayers-project and I&#39;ve been trying for days now.<br>
Kind regards<br>Andreia<br><br><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Bart van den Eijnden</b> <span dir="ltr">&lt;<a href="mailto:bartvde@osgis.nl">bartvde@osgis.nl</a>&gt;</span><br>
Date: 2010/8/12<br>Subject: Re: [OpenLayers-Users] WFS: Problem retrieving Features from Geoserver/PostGIS<br>To: andreia farrér &lt;<a href="mailto:andreia.farrer@gmail.com">andreia.farrer@gmail.com</a>&gt;<br>Cc: <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
<br><br><div style="word-wrap: break-word;">Hi,<div><br></div><div>use:</div><div><br></div><div>featureType: &quot;ogm_polygons&quot;,</div><div>featurePrefix: &quot;OpenGeoMap&quot;</div><div><br></div><div>alternatively, specify featureNS instead of featurePrefix. That&#39;s the namespace which is bound by Geoserver to the OpenGeoMap prefix.</div>
<div><br></div><div>Best regards,</div><div>Bart</div><div><br><div>
<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: medium;"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: medium;"><div style="word-wrap: break-word;">
<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: medium;"><div style="word-wrap: break-word;">
<div><div>-- </div><div>Looking for flexible support on OpenLayers or GeoExt? Please check out <a href="http://www.osgis.nl/support.html" target="_blank">http://www.osgis.nl/support.html</a></div><div><br></div><div>Bart van den Eijnden</div>
<div>OSGIS</div><div><a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a></div></div></div></span></div></span></span>
</div>
<br><div><div><div></div><div class="h5"><div>On Aug 12, 2010, at 9:24 AM, andreia farrér wrote:</div><br></div></div><blockquote type="cite"><div><div></div><div class="h5">Dear List,<br><br>I am trying to modify the wfs-editor.html-example for digitizing Points, Lines and Polygons. First I created a polygon-shapefile (one polygon in it, extending a big part of eastern Switzerland) in QGIS and imported it into my PostGIS-DB as &quot;ogm_polygons&quot;; then I published the layer in Geoserver. Now I would like to show the polygon-features in my map which somehow doesn&#39;t function.<br>

Here an extract of my code:<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"><font size="1">Ext.BLANK_IMAGE_URL = &quot;../ext/resources/images/default/s.gif&quot;;</font><br>

<font size="1">        </font><br><font size="1">        Ext.onReady(function() {</font><br><font size="1">            OpenLayers.ProxyHost = &quot;../cgi-bin/proxy.cgi?url=&quot;; </font><br><br><font size="1">var saveStrategy = new OpenLayers.Strategy.Save({</font><br>

<font size="1">                onCommit: function() {</font><br><font size="1">                    saveStrategy.ogm_polygons.refresh();</font><br><font size="1">                }</font><br><font size="1">            });</font><br>

<br><font size="1">var ogm_polygons = new OpenLayers.Layer.Vector(&quot;polygons&quot;,{</font><br><font size="1">                strategies: [new OpenLayers.Strategy.Fixed(), saveStrategy],</font><br><font size="1">                protocol: new OpenLayers.Protocol.WFS({</font><br>

<font size="1">                    url: &quot;<a href="http://localhost:8090/geoserver/wfs" target="_blank">http://localhost:8090/geoserver/wfs</a>&quot;,</font><br><font size="1">                    featureType: &quot;OpenGeoMap:ogm_polygons&quot;,</font><br>

<font size="1">                   </font><font size="1"> geometryName: &quot;the_geom&quot;,</font><br><font size="1">                    srsName: &quot;EPSG:21781&quot;,</font><br><font size="1">                    maxExtent: new OpenLayers.Bounds(140000, -240000, 1380000, 580000)                    </font><br>

<font size="1">                })</font><br><font size="1">            });</font><br><br><font size="1">var map_options = {maxExtent: new OpenLayers.Bounds(484000, 63000, 835000, 296000),</font><br><font size="1">                numZoomLevels: 12, maxScale: 5000, minScale: 2000000, units: &#39;m&#39;,  projection: &#39;EPSG:21781&#39;};</font><br>

<font size="1">            </font><br><font size="1">            var map = new OpenLayers.Map(map, map_options,{</font><br><font size="1">                allOverlays: true</font><br><font size="1">                });</font><br>

<br><font size="1">map.addLayer(ogm_polygons);</font><br><font size="1"> });</font><br></blockquote><font size="1">            <br><font size="2">Unfortunately the Layer won&#39;t show in my Mapwindow. If i fire up HttpFox and check the POST-Statement I get the following message:<br>

<br></font></font><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"><font size="1"><span style="font-family: courier new,monospace;">&lt;</span><span style="font-family: courier new,monospace;">wfs:FeatureCollection</span><span style="font-family: courier new,monospace;"> </span><span style="font-family: courier new,monospace;">xsi:schemaLocation</span><span style="font-family: courier new,monospace;">=</span><span style="font-family: courier new,monospace;">&quot;OpenGeoMap
 
<a href="http://localhost:8090/geoserver/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=OpenGeoMap%3Aogm_polygons" target="_blank">http://localhost:8090/geoserver/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=OpenGeoMap%3Aogm_polygons</a>
 <a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a> 
<a href="http://localhost:8090/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd" target="_blank">http://localhost:8090/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd</a>&quot;</span><span style="font-family: courier new,monospace;">&gt;</span></font><div style="font-family: courier new,monospace;">

<table><tbody><tr><td><font size="1"><span>&lt;</span><span>gml:boundedBy</span><span>&gt;</span></font><div><div><font size="1"><span>&lt;</span><span>gml:null</span><span>&gt;</span><span>unknown</span><span>&lt;/</span><span>gml:null</span><span>&gt;</span></font></div>

</div><font size="1"><span>&lt;/</span><span>gml:boundedBy</span><span>&gt;</span></font></td></tr></tbody></table><table><tbody><tr><td><font size="1"><span>&lt;</span><span>gml:featureMember</span><span>&gt;</span></font><div>

<table><tbody><tr><td><font size="1"><span>&lt;</span><span>OpenGeoMap:ogm_polygons</span> <span>fid</span><span>=</span><span>&quot;ogm_polygons.1&quot;</span><span>&gt;</span></font><div>
<div><font size="1"><span>&lt;</span><span>OpenGeoMap:bezeichnun</span><span>&gt;</span><span>test</span><span>&lt;/</span><span>OpenGeoMap:bezeichnun</span><span>&gt;</span></font></div>
<div><font size="1"><span>&lt;</span><span>OpenGeoMap:litho_01</span><span>&gt;</span><span>l1</span><span>&lt;/</span><span>OpenGeoMap:litho_01</span><span>&gt;</span></font></div>
<table><tbody><tr><td><font size="1"><span>&lt;</span><span>OpenGeoMap:the_geom</span><span>&gt;</span></font><div><table><tbody><tr><td><font size="1"><span>&lt;</span><span>gml:MultiPolygon</span> <span>srsName</span><span>=</span><span>&quot;<a href="http://www.opengis.net/gml/srs/epsg.xml#21781" target="_blank">http://www.opengis.net/gml/srs/epsg.xml#21781</a>&quot;</span><span>&gt;</span></font><div>

<table><tbody><tr><td><font size="1"><span>&lt;</span><span>gml:polygonMember</span><span>&gt;</span></font><div><table><tbody><tr><td><font size="1"><span>&lt;</span><span>gml:Polygon</span><span>&gt;</span></font><div>

<table><tbody><tr><td><font size="1"><span>&lt;</span><span>gml:outerBoundaryIs</span><span>&gt;</span></font><div><table><tbody><tr><td><font size="1"><span>&lt;</span><span>gml:LinearRing</span><span>&gt;</span></font><div>

<table><tbody><tr><td><font size="1"><span>&lt;</span><span>gml:coordinates</span> <span>decimal</span><span>=</span><span>&quot;.&quot;</span> <span>cs</span><span>=</span><span>&quot;,&quot;</span> <span>ts</span><span>=</span><span>&quot; &quot;</span><span>&gt;</span></font><div>

<div><font size="1">47701.85817123,185193.40602232
 120638.63788536,378756.39834058 328227.9339948,448887.91729647 
328227.9339948,448887.91729647 317006.89096185,78593.49720937 
47701.85817123,185193.40602232</font></div></div><font size="1"><span>&lt;/</span><span>gml:coordinates</span><span>&gt;</span></font></td></tr></tbody></table></div><font size="1"><span>&lt;/</span><span>gml:LinearRing</span><span>&gt;</span></font></td>

</tr></tbody></table></div><font size="1"><span>&lt;/</span><span>gml:outerBoundaryIs</span><span>&gt;</span></font></td></tr></tbody></table></div><font size="1"><span>&lt;/</span><span>gml:Polygon</span><span>&gt;</span></font></td>

</tr></tbody></table></div><font size="1"><span>&lt;/</span><span>gml:polygonMember</span><span>&gt;</span></font></td></tr></tbody></table></div><font size="1"><span>&lt;/</span><span>gml:MultiPolygon</span><span>&gt;</span></font></td>

</tr></tbody></table></div><font size="1"><span>&lt;/</span><span>OpenGeoMap:the_geom</span><span>&gt;</span></font></td></tr></tbody></table></div><font size="1"><span>&lt;/</span><span>OpenGeoMap:ogm_polygons</span><span>&gt;</span></font></td>

</tr></tbody></table></div><font size="1"><span>&lt;/</span><span>gml:featureMember</span><span>&gt;</span></font></td></tr></tbody></table></div><font style="font-family: courier new,monospace;" size="1"><span>&lt;/</span><span>wfs:FeatureCollection</span><span>&gt;</span></font><br>

</blockquote><br>In my eyes this looks totally fine, but I&#39;m absolutely clueless why the feature won&#39;t show in my Map!<br>Has anybody any idea on what I&#39;m doing wrong?<br>Any help is greatly appreciated; many thanks already in advance!<br>

Sincerely<br>Andreia<br><br><br clear="all"><br>-- <br>Andreia Farrér, Birmensdorferstr. 260, 8055 Zürich; phone: +41 78 825 44 93<br></div></div>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</blockquote></div><br></div></div></div><br><br clear="all"><br>-- <br>Andreia Farrér, Birmensdorferstr. 260, 8055 Zürich; phone: +41 78 825 44 93<br>