<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'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="features" which is causing me the problem as I think it
should be typeName="routes".</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'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( "Routes",
"<a href="http://localhost:8080/geoserver/wfs" target="_blank">http://localhost:8080/geoserver/wfs</a>", {typename:
'routes:routes'},{        maxExtent:
bounds,typename:'routes',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='#ff0000';</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['strokeColor'] = "#ff00ff";
</p>
<p style="margin-bottom: 0in;">                feature.style['strokeWidth']=5;</p>
<p style="margin-bottom: 0in;">                 feature.style['strokeOpacity']= 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:'routes'});</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['strokeColor'] = "#ffff00";
</p>
<p style="margin-bottom: 0in;">                feature.style['strokeWidth']=5;</p>
<p style="margin-bottom: 0in;">                 feature.style['strokeOpacity']= 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"><wfs:Transaction xmlns:wfs="<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a>" version="1.0.0" service="WFS"><wfs:Insert><feature
<br></font><br><font size="2">:routes xmlns:feature="<a href="http://mapserver.gis.umn.edu/mapserver" target="_blank">http://mapserver.gis.umn.edu/mapserver</a>"><feature:the_geom><gml:LineString xmlns
</font><br><font size="2">:gml="<a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.net/gml</a>"><gml:coordinates decimal="." cs="," ts=" ">310027.2265275199
,222116</font><br><font size="2">.6655236673 309321.6713529641,221058.33276183365</gml:coordinates></gml:LineString></feature:the_geom</font><br><font size="2">></feature:routes></wfs:Insert></wfs:Transaction>
</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"><wfs:Transaction xmlns:wfs="<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a>" version="1.0.0" service="WFS"><wfs:Update typeName
<br></font><br><font size="2">="features"><wfs:Property><wfs:Name>the_geom</wfs:Name><wfs:Value><gml:LineString xmlns:gml="<a href="http://www/" target="_blank">http://www</a></font>
<br><font size="2">.opengis.net/gml"><gml:coordinates decimal="." cs="," ts=" ">310027.22652752,222116.66552367 310521.11514970666</font><br><font size="2">,220881.94396819445 309321.67135296
,221058.33276183</gml:coordinates></gml:LineString></wfs:Value></wfs</font><br><font size="2">:Property><ogc:Filter xmlns:ogc="<a href="http://www.opengis.net/ogc" target="_blank">http://www.opengis.net/ogc
</a>"><ogc:FeatureId fid="routes.108"/></ogc:Filter</font><br><font size="2">></wfs:Update></wfs:Transaction></font></pre>