[OpenLayers-Users] set extractAttributes to true for WFS layer

David Fawcett david.fawcett at gmail.com
Wed Apr 28 22:14:02 EDT 2010


Joanne,

I would first verify that your server is sending the WFS attributes.
Use FireBug to look at the WFS request and response.

If you are not getting attributes as part of your response, you may
need to tweak the settings on your WFS server.  If you are using
MapServer, this recent post might help you out:
http://openlayers.org/pipermail/users/2010-April/017363.html

David.

On Wed, Apr 28, 2010 at 4:34 PM, myOpenLayersUName
<joanne.mcgraw at sympatico.ca> wrote:
>
> Hello all,
>
> I've read the docs and a bunch of forum postings; and I have googled. All to
> no avail. So, I'll try adding my own post even though this is so simple I
> can't imagine why I can't find any answers.
>
>
> I have added a WFS layer to my OpenLayers map. I have set the
> extractAttributes property to true. The points from the WFS display properly
> but the WFS layer's attributes are null. Where are the attributes to be
> found in the layer?
>
> And, on a similar note, why isn't there any geometry associated with the WFS
> layer either? That value is also null but, as a Vector layer, I'm not sure
> how it's drawing the features if there's no geometry attached. I always
> thought it used that object to display the vector features. Perhaps it
> doesn't and the fact that it's not there is not surprising to people who
> know more about this than I do.
>
> It all seems very strange and makes me think I'm adding this layer to the
> map incorrectly. My code is below and I'd welcome any input. My principle
> question being ... if extractAttributes is set to true, where am I to find
> the attributes in the layer.
>
> Cheers,
>
> var wfs = new OpenLayers.Layer.WFS(
>    "Title",
>    "http://url2wfs/",
>    {typename: 'layerName'}
>    ,{
>        extractAttributes: true
>    }
> );
> this.map.addLayers([wfs]);
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/set-extractAttributes-to-true-for-WFS-layer-tp4977018p4977018.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



More information about the Users mailing list