[OpenLayers-Users] Feature access from WFS

Jorge de Jesus jorge.de-jesus at jrc.it
Tue Sep 30 06:50:32 EDT 2008


Hi to all
This is probably a newbie question....

I have a WFS service that replies with point features (inside the
feature collection) like this:
<gml:featureMember>
  <ms:qeberpsceu79rpjiade43099p6 fid="0">
  <ms:msGeometry>
        <gml:Point srsName="EPSG:4326">
        <gml:coordinates>5.759029,50.993000</gml:coordinates>
        </gml:Point>
   </ms:msGeometry>
<ms:cat>0</ms:cat>
<ms:z>1022</ms:z>
</ms:qeberpsceu79rpjiade43099p6>
</gml:featureMember>

Assuming a normal WFS layer script like this

  test_wfs = new OpenLayers.Layer.WFS( "test_data",
                "http://localhost/aci2/ows.php?",
                {typename: "qeberpsceu79rpjiade43099p6"},
                { extractAttributes: true, featureClass:
OpenLayers.Feature.WFS});
    map.addLayer(test_wfs);

For what I understood from the documentation  the features (which I
understand as <ms:cat> and <ms:z>) will be stored in the feature member
of the OpenLayers.Layer.WFS class (it is inhered from
OpenLayers.Layer.Vector). But my features member is completely empty the
the WFS loading event, and using Firebug I search in all the
objects/class etc to see if there was any trace of the data, but couldnt
find anything that looked like my data.

I am using the Openlayers 2.7 -RC1

Can anyone point me to a proper example, or can give me a tip on what I
am doing wrong ?!  Or if I am just messing everything up ?!

Thanks in Advance
Jorge

PS: I also support an OpenLayer book !!!

-- 
Ph.D. Jorge Samuel Mendes de Jesus

European Commission (EC)
Joint Research Centre Directorate (DG JRC)
Institute for Environment and Sustainability (IES)
TP 441, Via Fermi 1
21020 Ispra (VA)
Italy

Phone: +39 0332 78 3536
Fax:   +39 0332 78 5466

http://rem.jrc.cec.eu.int

"The views expressed are purely those of the writer and may not in any circumstances be regarded as stating an official position of the European Commission"




More information about the Users mailing list