<div>Thanks for speedy reply, much appreciated.</div>
<div>That example works with a new vector layer, with trunck/2.8-rc1 will I be able to edit/add existing features in a geodatabase? <br><br></div>
<div class="gmail_quote">On Thu, Apr 30, 2009 at 9:28 AM, Christopher Schmidt <span dir="ltr">&lt;<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">On Thu, Apr 30, 2009 at 08:46:16AM +1200, chris Wild wrote:<br>&gt; Hi all,<br>&gt; Can someone please tell me whats missing from my code to get WFS-t to commit<br>&gt; changes.<br>&gt; The demo works fine and my example works fine up to saving changes to file<br>
&gt; when an extra line is added.The data is added from postgreSQl database with<br>&gt; PostGIS.<br><br><br></div>The Layer.WFS pobably will not work to save changes to a server. Look at<br><a href="http://openlayers.org/dev/examples/wfs-protocol-transactions.html" target="_blank">http://openlayers.org/dev/examples/wfs-protocol-transactions.html</a><br>
instead. (Needs trunk/2.8-rc1)<br>
<div>
<div></div>
<div class="h5">&gt;             var roads = new OpenLayers.Layer.WFS(<br>&gt;                 &quot;Track&quot;,<br>&gt;                 &quot;/geoserver/wfs&quot;,<br>&gt;                 {typename: &#39;topp:ttlines&#39;},<br>
&gt;                 {<br>&gt;                     typename: &#39;topp:ttlines&#39;,<br>&gt;                     featureNS: &#39;<a href="http://www.openplans.org/topp" target="_blank">http://www.openplans.org/topp</a>&#39;,<br>
&gt;                     extractAttributes: false<br>&gt;                 }<br>&gt;             );<br>&gt;             roads.style = OpenLayers.Util.applyDefaults({strokeColor:<br>&gt; &quot;#ff0000&quot;},<br>&gt;                     OpenLayers.Feature.Vector.style[&quot;default&quot;]);<br>
&gt;<br>&gt;             map.addLayers([tiled, untiled, roads]);<br>&gt;<br>&gt;             var panel = new OpenLayers.Control.Panel(<br>&gt;                 {displayClass: &#39;olControlEditingToolbar&#39;}<br>&gt;             );<br>
&gt;<br>&gt;             var drawLine = new OpenLayers.Control.DrawFeature(<br>&gt;                 roads, OpenLayers.Handler.Path,<br>&gt;                 {displayClass: &#39;olControlDrawFeaturePath&#39;}<br>&gt;             );<br>
&gt;                 drawLine.featureAdded = function(feature) {<br>&gt;                 feature.layer.eraseFeatures([feature]);<br>&gt;                 // cast to multilinestring<br>&gt;                 feature.geometry = new OpenLayers.Geometry.MultiLineString(<br>
&gt;                     feature.geometry<br>&gt;                 );<br>&gt;                 feature.style.strokeColor = &quot;#ff0000&quot;;<br>&gt;                 feature.state = OpenLayers.State.INSERT;<br>&gt;                 feature.layer.drawFeature(feature);<br>
&gt;             }<br>&gt;<br>&gt;             panel.addControls(<br>&gt;                 [new OpenLayers.Control.Navigation(), drawLine]<br>&gt;             );<br>&gt;             map.addControl(panel);<br>&gt;             map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
&gt;             map.zoomToExtent(<br>&gt;                 new OpenLayers.Bounds(2629421.7940751617, 6192776.755018141,<br>&gt;                     2633541.55790017, 6195366.924973875)<br>&gt;             );<br>&gt;         }<br>
&gt;     &lt;/script&gt;<br>&gt;   &lt;/head&gt;<br>&gt;   &lt;body onload=&quot;init()&quot;&gt;<br>&gt;     &lt;h3&gt;OpenLayers WFS-T demo: Tasmania cities and roads&lt;/h3&gt;<br>&gt;     &lt;a href=&quot;#&quot; onclick=&quot;map.layers[2].commit();return false&quot;&gt;Save Roads&lt;/a&gt;<br>
&gt;     &lt;div id=&quot;map&quot;&gt;&lt;/div&gt;<br>&gt;   &lt;/body&gt;<br>&gt; &lt;/html&gt;<br>&gt;<br>&gt; Many Thanks<br>&gt; Chris<br><br></div></div>&gt; _______________________________________________<br>&gt; Users mailing list<br>
&gt; <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>&gt; <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br><font color="#888888"><br>
<br>--<br>Christopher Schmidt<br>MetaCarta<br></font></blockquote></div><br>