I don't know wether the OpenLayers.Layer.WFS actually allows for styleMaps,
but I'm sure OpenLayers.Layer.Vector does: try creating a feature-layer with
this latter method.

Ex.
                myWfsLayer = new OpenLayers.Layer.Vector("layerName", {
                        styleMap: myStyle,
                        strategies: [myStrategy],
                        filter: myFilter,
                        protocol: new OpenLayers.Protocol.WFS({
                                url: myWfsUrl,
                                featureType: "layerName",
                                featureNS: "workspaceNamespaceURI",
                                srsName: "EPSG:XXXX", 
                                version: "<version>"
                                })
                });

I believe you're not the first having problems with OpenLayers.Layer.WFS.
(I guess you're using Geoserver on the server side (that topp: is familiar):
layerName is then the name of the layer in Geoserver).

Hope this helps!
Piero

The filter is optional



-- 
View this message in context: 
http://n2.nabble.com/how-to-control-the-style-of-a-WFS-layer-tp4838263p4838384.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to