Hello list,<br><br>Some months ago, Alexander Schäfer see that there was a problem with WFS 1.1.0 to display a layer on the map, stored well in the database.<br><a href="http://lists.maptools.org/pipermail/tinyows-users/2010-May/000086.htm">http://lists.maptools.org/pipermail/tinyows-users/2010-May/000086.htm</a><br>
<br>Is it always a known issue? An Openlayers issue? A config mistake from myself?<br>When only switching to 1.0.0, the same code is perfectly fine and the layer displays on the map.<br>I don&#39;t see the advantage of 1.1.0 version, so 1.0.0 is enought?<br>
<br>Regards<br><br>ThomasG<br><br>PS : below, my test code<br><br>--SQL--<br><br><br>SET statement_timeout = 0;<br>SET client_encoding = &#39;UTF8&#39;;<br>SET standard_conforming_strings = off;<br>SET check_function_bodies = false;<br>
SET client_min_messages = warning;<br>SET escape_string_warning = off;<br>SET default_tablespace = &#39;&#39;;<br>SET default_with_oids = false;<br><br>CREATE SCHEMA gis_schema<br>       AUTHORIZATION postgres;<br><br>CREATE TABLE gis_schema.parcelle (<br>
    gid integer NOT NULL,<br>    idu character varying(80),<br>    supf numeric,<br>    indp numeric,<br>    autocad_el numeric,<br>    the_geom public.geometry,<br>    CONSTRAINT enforce_dims_the_geom CHECK ((public.st_ndims(the_geom) = 2)),<br>
    CONSTRAINT enforce_geotype_the_geom CHECK (((public.geometrytype(the_geom) = &#39;MULTIPOLYGON&#39;::text) OR (the_geom IS NULL))),<br>    CONSTRAINT enforce_srid_the_geom CHECK ((public.st_srid(the_geom) = 4326))<br>
);<br>ALTER TABLE parcelle OWNER TO postgres;<br>CREATE SEQUENCE parcelle_gid_seq<br>    START WITH 1<br>    INCREMENT BY 1<br>    NO MAXVALUE<br>    NO MINVALUE<br>    CACHE 1;<br>ALTER TABLE gis_schema.parcelle_gid_seq OWNER TO postgres;<br>
ALTER SEQUENCE parcelle_gid_seq OWNED BY parcelle.gid;<br>SELECT pg_catalog.setval(&#39;parcelle_gid_seq&#39;, 1, true);<br>ALTER TABLE gis_schema.parcelle ALTER COLUMN gid SET DEFAULT nextval(&#39;parcelle_gid_seq&#39;::regclass);<br>
ALTER TABLE gis_schema.parcelle<br>    ADD CONSTRAINT parcelle_pkey PRIMARY KEY (gid);<br>CREATE INDEX parcelle_the_geom_gist ON parcelle USING gist (the_geom);<br><br>INSERT INTO geometry_columns (f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type) VALUES (&#39;&#39;, &#39;gis_schema&#39;, &#39;parcelle&#39;, &#39;the_geom&#39;, 2, 4326, &#39;MULTIPOLYGON&#39;);<br>
<br>&lt;!--config.xml file--&gt;<br><br>&lt;tinyows online_resource=&quot;<a href="http://localhost/cgi-bin/tinyows">http://localhost/cgi-bin/tinyows</a>&quot;<br>         schema_dir=&quot;/usr/local/tinyows/schema/&quot;&gt;<br>
 <br>&lt;pg host=&quot;127.0.0.1&quot; user=&quot;postgres&quot; password=&quot;atlas&quot; dbname=&quot;gavrelle&quot; port=&quot;5432&quot;/&gt;<br> <br>  &lt;metadata name=&quot;TinyOWS Server&quot;<br>            title=&quot;TinyOWS Server - Gavrelle EP&quot; /&gt;<br>
 <br>  &lt;contact name=&quot;TinyOWS Server&quot;<br>           site=&quot;<a href="http://www.tinyows.org/">http://www.tinyows.org/</a>&quot;<br>           email=&quot;<a href="mailto:tinyows-users@lists.maptools.org">tinyows-users@lists.maptools.org</a>&quot; /&gt;<br>
 <br>  <br>    &lt;layer retrievable=&quot;1&quot;<br>         writable=&quot;1&quot;<br>     srid=&quot;4326&quot;<br>     queryable=&quot;1&quot;<br>         prefix=&quot;gavrelle&quot;<br>         server=&quot;localhost&quot;<br>
         schema=&quot;gis_schema&quot;<br>         name=&quot;parcelle&quot;<br>         title=&quot;parcelles&quot; /&gt;<br>  <br>&lt;/tinyows&gt;<br><br><br><br>//javascript tinyows.js<br><br>var map, wfs;<br>OpenLayers.ProxyHost = &quot;/cgi-bin/proxy.cgi?url=&quot;;<br>
<br>var DeleteFeature = OpenLayers.Class(OpenLayers.Control, {<br>    initialize: function(layer, options) {<br>        OpenLayers.Control.prototype.initialize.apply(this, [options]);<br>        this.layer = layer;<br>        this.handler = new OpenLayers.Handler.Feature(<br>
            this, layer, {click: this.clickFeature}<br>        );<br>    },<br>    clickFeature: function(feature) {<br>        // if feature doesn&#39;t have a fid, destroy it<br>        if(feature.fid == undefined) {<br>
            this.layer.destroyFeatures([feature]);<br>        } else {<br>            feature.state = OpenLayers.State.DELETE;<br>            this.layer.events.triggerEvent(&quot;afterfeaturemodified&quot;, <br>                                           {feature: feature});<br>
            feature.renderIntent = &quot;select&quot;;<br>            this.layer.drawFeature(feature);<br>        }<br>    },<br>    setMap: function(map) {<br>        this.handler.setMap(map);<br>        OpenLayers.Control.prototype.setMap.apply(this, arguments);<br>
    },<br>    CLASS_NAME: &quot;OpenLayers.Control.DeleteFeature&quot;<br>});<br><br><br><br>function showMsg(szMessage) {<br>    document.getElementById(&quot;message&quot;).innerHTML = szMessage;<br>    setTimeout(<br>        &quot;document.getElementById(&#39;message&#39;).innerHTML = &#39;&#39;&quot;,2000);<br>
}<br><br>function showSuccessMsg(){<br>    showMsg(&quot;Transaction successfully completed&quot;);<br>};<br><br>function showFailureMsg(){<br>    showMsg(&quot;An error occured while operating the transaction&quot;);<br>
};<br><br><br>function init() {<br>    map = new OpenLayers.Map(&#39;map&#39;, {<br>        projection: new OpenLayers.Projection(&quot;EPSG:4326&quot;),<br>        units: &quot;degrees&quot;,<br>        maxResolution: &quot;auto&quot;,<br>
        maxExtent: new OpenLayers.Bounds(-5.34, 41.92, 10.84, 51.59),<br>        controls: [<br>            new OpenLayers.Control.PanZoom()<br>        ]<br>    });<br><br>    var region = new OpenLayers.Layer.WMS(<br>        &quot;Region Carmen&quot;,<br>
    &quot;<a href="http://ws.carmencarto.fr/WMS/34/patnat2008">http://ws.carmencarto.fr/WMS/34/patnat2008</a>?&quot;,<br>        {layers: &#39;Region&#39;, format: &#39;image/png&#39;},<br>    {projection:&quot;EPSG:4326&quot;,  units: &quot;degrees&quot;, maxResolution: &quot;auto&quot;, maxExtent: new OpenLayers.Bounds(-5.34, 41.92, 10.84, 51.59)}<br>
    );<br><br>    var saveStrategy = new OpenLayers.Strategy.Save();<br>    saveStrategy.events.register(&quot;success&quot;, &#39;&#39;, showSuccessMsg);<br>    saveStrategy.events.register(&quot;failure&quot;, &#39;&#39;, showFailureMsg);<br>
<br>    wfs = new OpenLayers.Layer.Vector(&quot;Editable Features&quot;, {<br>        strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],<br>        projection: new OpenLayers.Projection(&quot;EPSG:4326&quot;),<br>
        protocol: new OpenLayers.Protocol.WFS({<br>            version: &quot;1.0.0&quot;,<br>            srsName: &quot;EPSG:4326&quot;,<br>            url: &quot;<a href="http://localhost/cgi-bin/tinyows">http://localhost/cgi-bin/tinyows</a>&quot;,<br>
            featureNS :  &quot;localhost&quot;,<br>            featureType: &quot;parcelle&quot;,<br>            geometryName: &quot;the_geom&quot;,<br>            schema: &quot;<a href="http://localhost/cgi-bin/tinyows?service=wfs&amp;request=DescribeFeatureType&amp;version=1.0.0&amp;typename=gavrelle:parcelle">http://localhost/cgi-bin/tinyows?service=wfs&amp;request=DescribeFeatureType&amp;version=1.0.0&amp;typename=gavrelle:parcelle</a>&quot;,<br>
            extractAttributes: true<br>        })<br>    }); <br>   <br>    map.addLayers([region, wfs]);<br><br>    var panel = new OpenLayers.Control.Panel(<br>        {&#39;displayClass&#39;: &#39;customEditingToolbar&#39;}<br>
    );<br>    <br>    var navigate = new OpenLayers.Control.Navigation({<br>        title: &quot;Pan Map&quot;<br>    });<br>    <br>    var draw = new OpenLayers.Control.DrawFeature(<br>        wfs, OpenLayers.Handler.Polygon,<br>
        {<br>            title: &quot;Draw Feature&quot;,<br>            displayClass: &quot;olControlDrawFeaturePolygon&quot;,<br>            multi: true<br>        }<br>    );<br>    <br>    var edit = new OpenLayers.Control.ModifyFeature(wfs, {<br>
        title: &quot;Modify Feature&quot;,<br>        displayClass: &quot;olControlModifyFeature&quot;<br>    });<br><br>    var del = new DeleteFeature(wfs, {title: &quot;Delete Feature&quot;});<br>   <br>    var save = new OpenLayers.Control.Button({<br>
        title: &quot;Save Changes&quot;,<br>        trigger: function() {<br>            if(edit.feature) {<br>                edit.selectControl.unselectAll();<br>            }<br>            saveStrategy.save();<br>        },<br>
        displayClass: &quot;olControlSaveFeatures&quot;<br>    });<br><br>function controlSelectFeature(wfs) {<br>                feature_style = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style[&#39;default&#39;]);<br>
                feature_style.fillColor = &quot;#FCFF6F&quot;;<br>                feature_style.fillOpacity = 0.5;   <br>                options = {       <br>                    hover: false,<br>                    onSelect: popUP,<br>
                    selectStyle :feature_style<br>                };       <br>                selection = new OpenLayers.Control.SelectFeature(wfs, options);<br>                              <br>                map.addControl(selection);<br>
                selection.activate();<br>            }<br><br>          function popUP(e) {<br>                if(typeof popup!=&#39;undefined&#39;){<br>                    popup.destroy();<br>                }<br>                var htmlContent = &quot;&lt;b&gt;Pays : &quot;+e.attributes.idu+&quot;&lt;/b&gt;&lt;br /&gt; &lt;b&gt;&lt;i&gt;Region : &quot;+e.attributes.supf+&quot;&lt;/b&gt;&lt;/i&gt;&quot;;       <br>
                var size = new OpenLayers.Size(20,34);<br>                var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);<br>                popup = new OpenLayers.Popup.FramedCloud(<br>                    e.fid,<br>
                    e.geometry.getBounds().getCenterLonLat(),<br>                    null,<br>                    htmlContent,<br>                    null,<br>                    false,<br>                    null<br>                );<br>
                map.addPopup(popup);                  <br>            }<br><br>            function featureStyle() {<br>                feature_style = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style[&#39;default&#39;]);<br>
                feature_style.strokeWidth = 1;<br>                feature_style.strokeColor = &quot;#000000&quot;;<br>                feature_style.fillColor = &quot;#E11320&quot;;<br>                feature_style.fillOpacity = 0.5;   <br>
                return feature_style;<br>            }  <br><br><br><br><br>    controlSelectFeature(wfs);<br>    panel.addControls([ selection,navigate, save, del, edit, draw]);<br>    panel.defaultControl = navigate;<br>
    map.addControl(panel);<br>    map.zoomToMaxExtent();<br>}<br><br><br><br>&lt;!--html with call to js file--&gt;<br><br>&lt;html&gt;<br>  &lt;head&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;../theme/default/style.css&quot; type=&quot;text/css&quot; /&gt;<br>
    &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot; type=&quot;text/css&quot; /&gt;<br>    &lt;script src=&quot;../lib/OpenLayers.js&quot;&gt;&lt;/script&gt;<br>    &lt;style&gt;<br><br>    #map {<br>            width: 800px;<br>
           height: 500px;<br>            float: left;<br>            border: 1px solid #ccc;<br>    }<br>        #message {<br>        position: relative;<br>            left: 5px;<br>    }<br>        #docs {<br>            float: left;<br>
    }<br>        .customEditingToolbar {<br>            float: right;<br>            right: 0px;<br>            height: 30px; <br>            width: 200px;<br>        }<br>        .customEditingToolbar div {<br>            float: right;<br>
            margin: 5px;<br>            width: 24px;<br>            height: 24px;<br>        }<br>        .olControlNavigationItemActive { <br>            background-image: url(&quot;../theme/default/img/editing_tool_bar.png&quot;);<br>
            background-repeat: no-repeat;<br>            background-position: -103px -23px; <br>        }<br>        .olControlNavigationItemInactive { <br>            background-image: url(&quot;../theme/default/img/editing_tool_bar.png&quot;);<br>
            background-repeat: no-repeat;<br>            background-position: -103px -0px; <br>        }<br>        .olControlDrawFeaturePolygonItemInactive { <br>            background-image: url(&quot;../theme/default/img/editing_tool_bar.png&quot;);<br>
            background-repeat: no-repeat;<br>            background-position: -26px 0px; <br>        }<br>        .olControlDrawFeaturePolygonItemActive { <br>            background-image: url(&quot;../theme/default/img/editing_tool_bar.png&quot;);<br>
            background-repeat: no-repeat;<br>            background-position: -26px -23px ;                                                                   <br>        }<br>        .olControlModifyFeatureItemActive { <br>
            background-image: url(../theme/default/img/move_feature_on.png);<br>            background-repeat: no-repeat;<br>            background-position: 0px 1px;<br>        }<br>        .olControlModifyFeatureItemInactive { <br>
            background-image: url(../theme/default/img/move_feature_off.png);<br>            background-repeat: no-repeat;<br>            background-position: 0px 1px;<br>        }<br>        .olControlDeleteFeatureItemActive { <br>
            background-image: url(../theme/default/img/remove_point_on.png);<br>            background-repeat: no-repeat;<br>            background-position: 0px 1px;<br>        }<br>        .olControlDeleteFeatureItemInactive { <br>
            background-image: url(../theme/default/img/remove_point_off.png);<br>            background-repeat: no-repeat;<br>            background-position: 0px 1px;<br>        }<br><br>        .olControlSelectFeatureItemActive { <br>
            background-image: url(../theme/default/img/remove_point_off.png);<br>            background-repeat: no-repeat;<br>            background-position: 0px 1px;<br>        }<br><br>        .olControlSelectFeatureItemInactive { <br>
            background-image: url(../theme/default/img/remove_point_off.png);<br>            background-repeat: no-repeat;<br>            background-position: 0px 1px;<br>        }<br><br><br><br>    &lt;/style&gt;<br>    &lt;script src=&quot;tinyows.js&quot;&gt;&lt;/script&gt;<br>
    &lt;/head&gt;<br><br>    &lt;body onload=&quot;init()&quot;&gt;<br>        &lt;h1 id=&quot;title&quot;&gt;WFS Transaction Example, (TinyOWS ans OpenLayers)&lt;/h1&gt;<br>        &lt;div id=&quot;tags&quot;&gt;&lt;/div&gt;<br>
        &lt;p id=&quot;shortdesc&quot;&gt;<br>            Shows the use of the WFS Transactions (WFS-T).<br>        Parks of Osnabruck (Frida).<br>    &lt;br /&gt;<br>        Base layers is OpenStreetMap from Omniscale WMS Server.<br>
        &lt;/p&gt;<br>        &lt;div id=&quot;map&quot;&gt;&lt;/div&gt;<br><br>    &lt;div id=&quot;message&quot;&gt;&lt;/div&gt;<br>        &lt;div id=&quot;docs&quot;&gt;<br>            &lt;p&gt;<br>                The WFS protocol allows for creation of new features and<br>
                reading, updating, or deleting of existing features.<br>            &lt;/p&gt;<br>            &lt;p&gt;<br>                Use the tools to create, modify, and delete (in order from left<br>                to right) features. Use the save tool (picture of a disk) to<br>
                save your changes. Use the navigation tool (hand) to stop<br>                editing and use the mouse for map navigation.<br>            &lt;/p&gt;<br>            &lt;p&gt;<br>                See the &lt;a href=&quot;tinyows_wfs-t.js&quot; target=&quot;_blank&quot;&gt;wfs-protocol-transactions.js source&lt;/a&gt; to see how this is done.<br>
            &lt;/p&gt;        <br>        &lt;/div&gt;<br>    &lt;/body&gt;<br>&lt;/html&gt;<div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style>