<p style="margin-bottom: 0in;">Hello,</p>
<p style="margin-bottom: 0in;">I am doing a mapping project at college
where I am adding routes onto a map and generating a route card. I am
able to add the route (line) to the POSTGIS database no problem via
Geoserver. The area I&#39;m having a problem is on the update or
modification of the line. Below is the relevant code and the POST
requests generated by both requests. From what I can see it is the
typeName=&quot;features&quot; which is causing me the problem as I think it
should be typeName=&quot;routes&quot;.</p>

<p style="margin-bottom: 0in;">Am I right in thinking this is what
most likely the problem is and how do I change this for the request,
I have tried putting typeName in several places but to no avail.</p>

<p style="margin-bottom: 0in;">Any help would be most appreciated.</p>

<p style="margin-bottom: 0in;">Chris O&#39;Connor</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;">        routes = new
OpenLayers.Layer.WFS( &quot;Routes&quot;,
&quot;<a href="http://localhost:8080/geoserver/wfs" target="_blank">http://localhost:8080/geoserver/wfs</a>&quot;, {typename:
&#39;routes:routes&#39;},{        maxExtent:
bounds,typename:&#39;routes&#39;,extractAttributes: false});</p>

<p style="margin-bottom: 0in;">// Map Layer 7</p>
<p style="margin-bottom: 0in;">          routes.setVisibility(true);</p>
<p style="margin-bottom: 0in;">             
routes.style.strokeColor=&#39;#ff0000&#39;;</p>
<p style="margin-bottom: 0in;">          routes.style.strokeOpacity=0.3;</p>
<p style="margin-bottom: 0in;">          routes.style.strokeWidth=5;</p>
<p style="margin-bottom: 0in;">                    map.addLayer(routes);</p>
<p style="margin-bottom: 0in;">            var options =
{handlerOptions: {freehand: false}};</p>
<p style="margin-bottom: 0in;">        df = new
OpenLayers.Control.DrawFeature(routes,OpenLayers.Handler.Path,
options);</p>
<p style="margin-bottom: 0in;">        df.featureAdded =
function(feature) { 
</p>
<p style="margin-bottom: 0in;">                      feature.state =
OpenLayers.State.INSERT; 
</p>
<p style="margin-bottom: 0in;">             
        feature.style[&#39;strokeColor&#39;] = &quot;#ff00ff&quot;; 
</p>
<p style="margin-bottom: 0in;">                feature.style[&#39;strokeWidth&#39;]=5;</p>
<p style="margin-bottom: 0in;">                 feature.style[&#39;strokeOpacity&#39;]= 0.3;</p>
<p style="margin-bottom: 0in;">               
        feature.layer.drawFeature(feature); 
</p>
<p style="margin-bottom: 0in;">                map.layers[7].commit();</p>
<p style="margin-bottom: 0in;">                map.layers[7].refresh();</p>
<p style="margin-bottom: 0in;">            };</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;">        ef = new
OpenLayers.Control.ModifyFeature(routes,{typeName:&#39;routes&#39;});</p>

<p style="margin-bottom: 0in;">        ef.onModificationEnd=function(feature){</p>
<p style="margin-bottom: 0in;">                feature.state =
OpenLayers.State.UPDATE;</p>
<p style="margin-bottom: 0in;">           
        feature.style[&#39;strokeColor&#39;] = &quot;#ffff00&quot;; 
</p>
<p style="margin-bottom: 0in;">                feature.style[&#39;strokeWidth&#39;]=5;</p>
<p style="margin-bottom: 0in;">                 feature.style[&#39;strokeOpacity&#39;]= 0.3;</p>
<p style="margin-bottom: 0in;">                  
        feature.layer.drawFeature(feature);</p>

<p style="margin-bottom: 0in;">                map.layers[7].commit();</p>
<p style="margin-bottom: 0in;">                map.layers[7].refresh();</p>
<p style="margin-bottom: 0in;">                };</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;">Add request generated</p>
<pre style="margin-bottom: 0.2in;"><font size="2">&lt;wfs:Transaction xmlns:wfs=&quot;<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a>&quot; version=&quot;1.0.0&quot; service=&quot;WFS&quot;&gt;&lt;wfs:Insert&gt;&lt;feature
<br></font><br><font size="2">:routes xmlns:feature=&quot;<a href="http://mapserver.gis.umn.edu/mapserver" target="_blank">http://mapserver.gis.umn.edu/mapserver</a>&quot;&gt;&lt;feature:the_geom&gt;&lt;gml:LineString xmlns
</font><br><font size="2">:gml=&quot;<a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.net/gml</a>&quot;&gt;&lt;gml:coordinates decimal=&quot;.&quot; cs=&quot;,&quot; ts=&quot; &quot;&gt;310027.2265275199
,222116</font><br><font size="2">.6655236673 309321.6713529641,221058.33276183365&lt;/gml:coordinates&gt;&lt;/gml:LineString&gt;&lt;/feature:the_geom</font><br><font size="2">&gt;&lt;/feature:routes&gt;&lt;/wfs:Insert&gt;&lt;/wfs:Transaction&gt;
</font></pre><p style="margin-bottom: 0in;">
<br>
</p>
<p style="margin-bottom: 0in;">Update request generated</p>
<pre style="margin-bottom: 0.2in;"><font size="2">&lt;wfs:Transaction xmlns:wfs=&quot;<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a>&quot; version=&quot;1.0.0&quot; service=&quot;WFS&quot;&gt;&lt;wfs:Update typeName
<br></font><br><font size="2">=&quot;features&quot;&gt;&lt;wfs:Property&gt;&lt;wfs:Name&gt;the_geom&lt;/wfs:Name&gt;&lt;wfs:Value&gt;&lt;gml:LineString xmlns:gml=&quot;<a href="http://www/" target="_blank">http://www</a></font>
<br><font size="2">.opengis.net/gml&quot;&gt;&lt;gml:coordinates decimal=&quot;.&quot; cs=&quot;,&quot; ts=&quot; &quot;&gt;310027.22652752,222116.66552367 310521.11514970666</font><br><font size="2">,220881.94396819445 309321.67135296
,221058.33276183&lt;/gml:coordinates&gt;&lt;/gml:LineString&gt;&lt;/wfs:Value&gt;&lt;/wfs</font><br><font size="2">:Property&gt;&lt;ogc:Filter xmlns:ogc=&quot;<a href="http://www.opengis.net/ogc" target="_blank">http://www.opengis.net/ogc
</a>&quot;&gt;&lt;ogc:FeatureId fid=&quot;routes.108&quot;/&gt;&lt;/ogc:Filter</font><br><font size="2">&gt;&lt;/wfs:Update&gt;&lt;/wfs:Transaction&gt;</font></pre>