<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The WFS response is in EPSG:4326.<div><br></div><div>If you want to overlay your WFS layer on a basemap with EPSG:900913, you should also use that SRS in the WFS protocol and let the server reproject for you.</div><div><br></div><div>Best regards,</div><div>Bart</div><div><br></div><div>-- </div><div><div><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><div>Bart van den Eijnden<br>OpenGeo - <a href="http://opengeo.org/">http://opengeo.org</a><br>Expert service straight from the developers.</div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On Sep 25, 2012, at 7:35 AM, Smaran Harihar <<a href="mailto:smaran.harihar@gmail.com">smaran.harihar@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I have updated the WFS Layer with .v1_1_0 but still the WFS projection is wrong.<div><br></div><div><div>var pimaWFS = new OpenLayers.Layer.Vector("Pima Pine WFS", {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> strategies: [new OpenLayers.Strategy.BBOX()],</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> protocol: new OpenLayers.Protocol.WFS.v1_1_0({</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> url: "<a href="http://128.196.142.12:8080/geoserver/wfs">http://128.196.142.12:8080/geoserver/wfs</a>",</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> featureType: "PimaPine",</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> featureNS: "<a href="http://opengeo.org/">http://opengeo.org</a>",</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> srsName: "EPSG:4326"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> })</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> });<span class="Apple-tab-span" style="white-space:pre"> </span> <span class="Apple-tab-span" style="white-space:pre"> </span> </div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>wfsProtocol = new OpenLayers.Protocol.WFS.v1_1_0({</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> url: "<a href="http://128.196.142.12:8080/geoserver/wfs">http://128.196.142.12:8080/geoserver/wfs</a>",</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> featureType: "PimaPine",</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> featureNS: "<a href="http://opengeo.org/">http://opengeo.org</a>",</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> srsName: "EPSG:4326"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> });</div><div><br></div><div>Here is the <a href="http://128.196.142.12/geo/test/test_new.html">application</a>, that orange dot that you see is the WFS layer which is suppose to overlap the blue stars.</div>
<div><br></div><div>Thanks,</div><div>Smaran</div><br><div class="gmail_quote">On Mon, Sep 24, 2012 at 2:12 PM, Phil Scadden <span dir="ltr"><<a href="mailto:p.scadden@gns.cri.nz" target="_blank">p.scadden@gns.cri.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div class="im">
<br>
<blockquote type="cite">
<div><br>
</div>
<br>
<div>
<div>var pimaWFS = new OpenLayers.Layer.Vector("Pima Pine", {</div>
<div><span style="white-space:pre-wrap"> </span>
strategies: [new OpenLayers.Strategy.BBOX()],</div>
<div><span style="white-space:pre-wrap"> </span>
protocol: new OpenLayers.Protocol.WFS({</div>
<div><span style="white-space:pre-wrap"> </span>
url: "<a href="http://128.196.142.12:8080/geoserver/wfs" target="_blank">http://128.196.142.12:8080/geoserver/wfs</a>",</div>
<div><span style="white-space:pre-wrap"> </span>
featureType: "PimaPine",</div>
<div><span style="white-space:pre-wrap"> </span>
featureNS: "<a href="http://opengeo.org/" target="_blank">http://opengeo.org</a>",</div>
<div><span style="white-space:pre-wrap"> </span>
srsName: "EPSG:4326"</div>
<div><span style="white-space:pre-wrap"> </span>
})</div>
<div><span style="white-space:pre-wrap"> </span>
});</div>
<div><br>
</div>
<div>But still I have no luck despite specifying the srsName.</div>
</div>
</blockquote></div>
Nope. You MUST tell it to use v1_1_0 or srs isnt honoured.<br>
ie protocol: new OpenLayers.Protocol.WFS.v1_1_0({
<div class="im"><blockquote type="cite">
<div>
<div><br>
</div>
<div>My Geoserver is 2.1 and seems to be the latest build. How
can I check if it supports WFS 1.1.0 or not??</div>
</div>
</blockquote></div>
It supports 1.1 (you get details of what a server supports from
WFSGetcapabilities call.<div class="im"><br>
<br><p><span style="font-size:8pt;font-family:'Arial'">Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.</span></p><div><span style="font-size:8pt;font-family:'Arial'"> </span><br class="webkit-block-placeholder"></div></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Thanks & Regards<div>Smaran Harihar</div><br>
</div>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/openlayers-users<br></blockquote></div><br></div></body></html>