<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>use:</div><div><br></div><div>featureType: "ogm_polygons",</div><div>featurePrefix: "OpenGeoMap"</div><div><br></div><div>alternatively, specify featureNS instead of featurePrefix. That'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 class="Apple-style-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; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-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; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-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; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>--&nbsp;</div><div>Looking for flexible support on OpenLayers or GeoExt? Please check out <a href="http://www.osgis.nl/support.html">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">bartvde@osgis.nl</a></div></div></div></span></div></span></span>
</div>
<br><div><div>On Aug 12, 2010, at 9:24 AM, andreia farrér wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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 "ogm_polygons"; then I published the layer in Geoserver. Now I would like to show the polygon-features in my map which somehow doesn'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 = "../ext/resources/images/default/s.gif";</font><br>
<font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </font><br><font size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ext.onReady(function() {</font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; OpenLayers.ProxyHost = "../cgi-bin/proxy.cgi?url="; </font><br><br><font size="1">var saveStrategy = new OpenLayers.Strategy.Save({</font><br>
<font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; onCommit: function() {</font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; saveStrategy.ogm_polygons.refresh();</font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });</font><br>
<br><font size="1">var ogm_polygons = new OpenLayers.Layer.Vector("polygons",{</font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; strategies: [new OpenLayers.Strategy.Fixed(), saveStrategy],</font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; protocol: new OpenLayers.Protocol.WFS({</font><br>
<font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url: "<a href="http://localhost:8090/geoserver/wfs">http://localhost:8090/geoserver/wfs</a>",</font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; featureType: "OpenGeoMap:ogm_polygons",</font><br>
<font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;</font><font size="1"> geometryName: "the_geom",</font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; srsName: "EPSG:21781",</font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxExtent: new OpenLayers.Bounds(140000, -240000, 1380000, 580000)&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </font><br>
<font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; })</font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });</font><br><br><font size="1">var map_options = {maxExtent: new OpenLayers.Bounds(484000, 63000, 835000, 296000),</font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; numZoomLevels: 12, maxScale: 5000, minScale: 2000000, units: 'm',&nbsp; projection: 'EPSG:21781'};</font><br>
<font size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var map = new OpenLayers.Map(map, map_options,{</font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; allOverlays: true</font><br><font size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });</font><br>
<br><font size="1">map.addLayer(ogm_polygons);</font><br><font size="1">&nbsp;});</font><br></blockquote><font size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><font size="2">Unfortunately the Layer won'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;" class="markup">&lt;</span><span style="font-family: courier new,monospace;" class="start-tag">wfs:FeatureCollection</span><span style="font-family: courier new,monospace;"> </span><span style="font-family: courier new,monospace;" class="attribute-name">xsi:schemaLocation</span><span style="font-family: courier new,monospace;" class="markup">=</span><span style="font-family: courier new,monospace;" class="attribute-value">"OpenGeoMap
 
<a href="http://localhost:8090/geoserver/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=OpenGeoMap%3Aogm_polygons">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">http://www.opengis.net/wfs</a> 
<a href="http://localhost:8090/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd">http://localhost:8090/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd</a>"</span><span style="font-family: courier new,monospace;" class="markup">&gt;</span></font><div style="font-family: courier new,monospace;" class="expander-content">
<table><tbody><tr><td><font size="1"><span class="markup">&lt;</span><span class="start-tag">gml:boundedBy</span><span class="markup">&gt;</span></font><div class="expander-content"><div class="indent"><font size="1"><span class="markup">&lt;</span><span class="start-tag">gml:null</span><span class="markup">&gt;</span><span class="text">unknown</span><span class="markup">&lt;/</span><span class="end-tag">gml:null</span><span class="markup">&gt;</span></font></div>
</div><font size="1"><span class="markup">&lt;/</span><span class="end-tag">gml:boundedBy</span><span class="markup">&gt;</span></font></td></tr></tbody></table><table><tbody><tr><td><font size="1"><span class="markup">&lt;</span><span class="start-tag">gml:featureMember</span><span class="markup">&gt;</span></font><div class="expander-content">
<table><tbody><tr><td><font size="1"><span class="markup">&lt;</span><span class="start-tag">OpenGeoMap:ogm_polygons</span> <span class="attribute-name">fid</span><span class="markup">=</span><span class="attribute-value">"ogm_polygons.1"</span><span class="markup">&gt;</span></font><div class="expander-content">
<div class="indent"><font size="1"><span class="markup">&lt;</span><span class="start-tag">OpenGeoMap:bezeichnun</span><span class="markup">&gt;</span><span class="text">test</span><span class="markup">&lt;/</span><span class="end-tag">OpenGeoMap:bezeichnun</span><span class="markup">&gt;</span></font></div>
<div class="indent"><font size="1"><span class="markup">&lt;</span><span class="start-tag">OpenGeoMap:litho_01</span><span class="markup">&gt;</span><span class="text">l1</span><span class="markup">&lt;/</span><span class="end-tag">OpenGeoMap:litho_01</span><span class="markup">&gt;</span></font></div>
<table><tbody><tr><td><font size="1"><span class="markup">&lt;</span><span class="start-tag">OpenGeoMap:the_geom</span><span class="markup">&gt;</span></font><div class="expander-content"><table><tbody><tr><td><font size="1"><span class="markup">&lt;</span><span class="start-tag">gml:MultiPolygon</span> <span class="attribute-name">srsName</span><span class="markup">=</span><span class="attribute-value">"<a href="http://www.opengis.net/gml/srs/epsg.xml#21781">http://www.opengis.net/gml/srs/epsg.xml#21781</a>"</span><span class="markup">&gt;</span></font><div class="expander-content">
<table><tbody><tr><td><font size="1"><span class="markup">&lt;</span><span class="start-tag">gml:polygonMember</span><span class="markup">&gt;</span></font><div class="expander-content"><table><tbody><tr><td><font size="1"><span class="markup">&lt;</span><span class="start-tag">gml:Polygon</span><span class="markup">&gt;</span></font><div class="expander-content">
<table><tbody><tr><td><font size="1"><span class="markup">&lt;</span><span class="start-tag">gml:outerBoundaryIs</span><span class="markup">&gt;</span></font><div class="expander-content"><table><tbody><tr><td><font size="1"><span class="markup">&lt;</span><span class="start-tag">gml:LinearRing</span><span class="markup">&gt;</span></font><div class="expander-content">
<table><tbody><tr><td><font size="1"><span class="markup">&lt;</span><span class="start-tag">gml:coordinates</span> <span class="attribute-name">decimal</span><span class="markup">=</span><span class="attribute-value">"."</span> <span class="attribute-name">cs</span><span class="markup">=</span><span class="attribute-value">","</span> <span class="attribute-name">ts</span><span class="markup">=</span><span class="attribute-value">" "</span><span class="markup">&gt;</span></font><div class="expander-content">
<div class="indent text"><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 class="markup">&lt;/</span><span class="end-tag">gml:coordinates</span><span class="markup">&gt;</span></font></td></tr></tbody></table></div><font size="1"><span class="markup">&lt;/</span><span class="end-tag">gml:LinearRing</span><span class="markup">&gt;</span></font></td>
</tr></tbody></table></div><font size="1"><span class="markup">&lt;/</span><span class="end-tag">gml:outerBoundaryIs</span><span class="markup">&gt;</span></font></td></tr></tbody></table></div><font size="1"><span class="markup">&lt;/</span><span class="end-tag">gml:Polygon</span><span class="markup">&gt;</span></font></td>
</tr></tbody></table></div><font size="1"><span class="markup">&lt;/</span><span class="end-tag">gml:polygonMember</span><span class="markup">&gt;</span></font></td></tr></tbody></table></div><font size="1"><span class="markup">&lt;/</span><span class="end-tag">gml:MultiPolygon</span><span class="markup">&gt;</span></font></td>
</tr></tbody></table></div><font size="1"><span class="markup">&lt;/</span><span class="end-tag">OpenGeoMap:the_geom</span><span class="markup">&gt;</span></font></td></tr></tbody></table></div><font size="1"><span class="markup">&lt;/</span><span class="end-tag">OpenGeoMap:ogm_polygons</span><span class="markup">&gt;</span></font></td>
</tr></tbody></table></div><font size="1"><span class="markup">&lt;/</span><span class="end-tag">gml:featureMember</span><span class="markup">&gt;</span></font></td></tr></tbody></table></div><font style="font-family: courier new,monospace;" size="1"><span class="markup">&lt;/</span><span class="end-tag">wfs:FeatureCollection</span><span class="markup">&gt;</span></font><br>
</blockquote><br>In my eyes this looks totally fine, but I'm absolutely clueless why the feature won't show in my Map!<br>Has anybody any idea on what I'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>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>http://openlayers.org/mailman/listinfo/users<br></blockquote></div><br></div></body></html>