I'd like to style several WFS-Layers with one StyleObject:
WFS-Layers look like these:
var wfs_point = new OpenLayers.Layer.Vector("Multi Point
Feature", {
strategies: [new OpenLayers.Strategy.BBOX(),
save_point],
styleMap: *StyleObjekt*,
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
url: "http://localhost:8080/geoserver/wfs",
featureType: "pkt",
featureNS :
"http://www.openplans.org/topp",
srsName: "EPSG:31468",
maxExtent: bounds,
geometryName: "geom",
schema:
"http://localhost:8080/geoserver/wfs/DescribeFeatureType?request=GetCapabilities&version=1.1.0&typename=topp:pkt"
})
});
This is my StyleObj:
var *StyleObjekt *= new OpenLayers.StyleMap({
'default' : dStyle,
'select' : sStyle,
'temporary' : tStyle
});
This is a Style:
var *dStyle *= new OpenLayers.Style({
stroke: true,
strokeColor: "#0000ff",
fill: true,
fillColor: "#0000ff"
});
*But on the map, the WFS-Objects still have the OpenLayers default color*
(def: yellow/orange, edit: blue ...).
--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/Style-WFS-Layer-tp5005123.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users