[OpenLayers-Users] set extractAttributes to true for WFS layer
myOpenLayersUName
joanne.mcgraw at SYMPATICO.CA
Wed Apr 28 17:34:35 EDT 2010
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.
More information about the Users
mailing list