<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; ">Arrays have a length property. Please read up on javascript basics though.<div><br></div><div>Best regards,</div><div>Bart</div><div><br><div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>-- <br>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:20 PM, Smaran Harihar <<a href="mailto:smaran.harihar@gmail.com">smaran.harihar@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Thanks a lot Bart. I am new, so this might sound as a dumb question, but I thought 4326 was the same as 900913, assuming they both represent spherical mercator.<div><br></div><div>Now I have the entire feature collection, using 'e.features', but how can I fetch the count of features in e.features, as I need to loop through these features and add them to the table? I could not find a method as 'e.features.count'.</div>

<div><br></div><div>Thanks,</div><div>Smaran<br><br><div class="gmail_quote">On Tue, Sep 25, 2012 at 12:19 AM, Bart van den Eijnden <span dir="ltr"><<a href="mailto:bartvde@opengeo.org" target="_blank">bartvde@opengeo.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">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><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- </div></font></span><div><span class="HOEnZb"><font color="#888888"><span style="border-collapse:separate;border-spacing:0px"><div>

Bart van den Eijnden<br>OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org</a><br>Expert service straight from the developers.</div><div><br></div></span><br>

</font></span><div><div class="h5">
<br><div><div>On Sep 25, 2012, at 7:35 AM, Smaran Harihar <<a href="mailto:smaran.harihar@gmail.com" target="_blank">smaran.harihar@gmail.com</a>> wrote:</div><br><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 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.v1_1_0({</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> });<span style="white-space:pre-wrap">    </span> <span style="white-space:pre-wrap">       </span> </div>



<div><span style="white-space:pre-wrap">                                          </span> </div><div><span style="white-space:pre-wrap">                           </span>wfsProtocol = new OpenLayers.Protocol.WFS.v1_1_0({</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><br></div><div>Here is the <a href="http://128.196.142.12/geo/test/test_new.html" target="_blank">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>
    <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><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><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></div></div></div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org" target="_blank">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" target="_blank">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>

</blockquote></div><br></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Thanks & Regards<div>Smaran Harihar</div><br>
</div>
</blockquote></div><br></div></div></body></html>