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"> </font><br><font size="1"> Ext.onReady(function() {</font><br><font size="1"> OpenLayers.ProxyHost = "../cgi-bin/proxy.cgi?url="; </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("polygons",{</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: "<a href="http://localhost:8090/geoserver/wfs">http://localhost:8090/geoserver/wfs</a>",</font><br><font size="1"> featureType: "OpenGeoMap:ogm_polygons",</font><br>
<font size="1"> </font><font size="1"> geometryName: "the_geom",</font><br><font size="1"> srsName: "EPSG:21781",</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: 'm', projection: 'EPSG:21781'};</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'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"><</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&version=1.0.0&request=DescribeFeatureType&typeName=OpenGeoMap%3Aogm_polygons">http://localhost:8090/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&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">></span></font><div style="font-family: courier new,monospace;" class="expander-content">
<table><tbody><tr><td><font size="1"><span class="markup"><</span><span class="start-tag">gml:boundedBy</span><span class="markup">></span></font><div class="expander-content"><div class="indent"><font size="1"><span class="markup"><</span><span class="start-tag">gml:null</span><span class="markup">></span><span class="text">unknown</span><span class="markup"></</span><span class="end-tag">gml:null</span><span class="markup">></span></font></div>
</div><font size="1"><span class="markup"></</span><span class="end-tag">gml:boundedBy</span><span class="markup">></span></font></td></tr></tbody></table><table><tbody><tr><td><font size="1"><span class="markup"><</span><span class="start-tag">gml:featureMember</span><span class="markup">></span></font><div class="expander-content">
<table><tbody><tr><td><font size="1"><span class="markup"><</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">></span></font><div class="expander-content">
<div class="indent"><font size="1"><span class="markup"><</span><span class="start-tag">OpenGeoMap:bezeichnun</span><span class="markup">></span><span class="text">test</span><span class="markup"></</span><span class="end-tag">OpenGeoMap:bezeichnun</span><span class="markup">></span></font></div>
<div class="indent"><font size="1"><span class="markup"><</span><span class="start-tag">OpenGeoMap:litho_01</span><span class="markup">></span><span class="text">l1</span><span class="markup"></</span><span class="end-tag">OpenGeoMap:litho_01</span><span class="markup">></span></font></div>
<table><tbody><tr><td><font size="1"><span class="markup"><</span><span class="start-tag">OpenGeoMap:the_geom</span><span class="markup">></span></font><div class="expander-content"><table><tbody><tr><td><font size="1"><span class="markup"><</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">></span></font><div class="expander-content">
<table><tbody><tr><td><font size="1"><span class="markup"><</span><span class="start-tag">gml:polygonMember</span><span class="markup">></span></font><div class="expander-content"><table><tbody><tr><td><font size="1"><span class="markup"><</span><span class="start-tag">gml:Polygon</span><span class="markup">></span></font><div class="expander-content">
<table><tbody><tr><td><font size="1"><span class="markup"><</span><span class="start-tag">gml:outerBoundaryIs</span><span class="markup">></span></font><div class="expander-content"><table><tbody><tr><td><font size="1"><span class="markup"><</span><span class="start-tag">gml:LinearRing</span><span class="markup">></span></font><div class="expander-content">
<table><tbody><tr><td><font size="1"><span class="markup"><</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">></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"></</span><span class="end-tag">gml:coordinates</span><span class="markup">></span></font></td></tr></tbody></table></div><font size="1"><span class="markup"></</span><span class="end-tag">gml:LinearRing</span><span class="markup">></span></font></td>
</tr></tbody></table></div><font size="1"><span class="markup"></</span><span class="end-tag">gml:outerBoundaryIs</span><span class="markup">></span></font></td></tr></tbody></table></div><font size="1"><span class="markup"></</span><span class="end-tag">gml:Polygon</span><span class="markup">></span></font></td>
</tr></tbody></table></div><font size="1"><span class="markup"></</span><span class="end-tag">gml:polygonMember</span><span class="markup">></span></font></td></tr></tbody></table></div><font size="1"><span class="markup"></</span><span class="end-tag">gml:MultiPolygon</span><span class="markup">></span></font></td>
</tr></tbody></table></div><font size="1"><span class="markup"></</span><span class="end-tag">OpenGeoMap:the_geom</span><span class="markup">></span></font></td></tr></tbody></table></div><font size="1"><span class="markup"></</span><span class="end-tag">OpenGeoMap:ogm_polygons</span><span class="markup">></span></font></td>
</tr></tbody></table></div><font size="1"><span class="markup"></</span><span class="end-tag">gml:featureMember</span><span class="markup">></span></font></td></tr></tbody></table></div><font style="font-family: courier new,monospace;" size="1"><span class="markup"></</span><span class="end-tag">wfs:FeatureCollection</span><span class="markup">></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>